diff --git a/main.go b/main.go index 6688bee..ef684c6 100644 --- a/main.go +++ b/main.go @@ -18,13 +18,13 @@ import ( ) const ( - defaultHost = "0.0.0.0" - defaultPort = "50051" - defaultEsHost = "http://localhost" - defaultEsPort = "9200" + defaultHost = "0.0.0.0" + defaultPort = "50051" + defaultEsHost = "http://localhost" + defaultEsIndex = "claims" + defaultEsPort = "9200" ) - func GetEnvironment(data []string, getkeyval func(item string) (key, val string)) map[string]string { items := make(map[string]string) for _, item := range data { @@ -49,12 +49,13 @@ func parseArgs(searchRequest *pb.SearchRequest) *server.Args { parser := argparse.NewParser("hub", "hub server and client") serveCmd := parser.NewCommand("serve", "start the hub server") + debug := parser.Flag("", "debug", &argparse.Options{Required: false, Help: "enable debug logging", Default: false}) - host := parser.String("", "rpchost", &argparse.Options{Required: false, Help: "host", Default: defaultHost}) - port := parser.String("", "rpcport", &argparse.Options{Required: false, Help: "port", Default: defaultPort}) - esHost := parser.String("", "eshost", &argparse.Options{Required: false, Help: "host", Default: defaultEsHost}) - esPort := parser.String("", "esport", &argparse.Options{Required: false, Help: "port", Default: defaultEsPort}) - dev := parser.Flag("", "dev", &argparse.Options{Required: false, Help: "port", Default: false}) + host := parser.String("", "rpchost", &argparse.Options{Required: false, Help: "RPC host", Default: defaultHost}) + port := parser.String("", "rpcport", &argparse.Options{Required: false, Help: "RPC port", Default: defaultPort}) + esHost := parser.String("", "eshost", &argparse.Options{Required: false, Help: "elasticsearch host", Default: defaultEsHost}) + esPort := parser.String("", "esport", &argparse.Options{Required: false, Help: "elasticsearch port", Default: defaultEsPort}) + esIndex := parser.String("", "esindex", &argparse.Options{Required: false, Help: "elasticsearch index name", Default: defaultEsIndex}) text := parser.String("", "text", &argparse.Options{Required: false, Help: "text query"}) name := parser.String("", "name", &argparse.Options{Required: false, Help: "name"}) @@ -72,14 +73,14 @@ func parseArgs(searchRequest *pb.SearchRequest) *server.Args { log.Fatalln(parser.Usage(err)) } - args := &server.Args{ - Serve: false, - Host: *host, - Port: ":" + *port, - EsHost: *esHost, - EsPort: *esPort, - Dev: *dev, + Serve: false, + Host: *host, + Port: ":" + *port, + EsHost: *esHost, + EsPort: *esPort, + EsIndex: *esIndex, + Debug: *debug, } if esHost, ok := environment["ELASTIC_HOST"]; ok { @@ -95,8 +96,8 @@ func parseArgs(searchRequest *pb.SearchRequest) *server.Args { } /* - Verify no invalid argument combinations - */ + Verify no invalid argument combinations + */ if len(*channelIds) > 0 && *channelId != "" { log.Fatal("Cannot specify both channel_id and channel_ids") } @@ -108,23 +109,23 @@ func parseArgs(searchRequest *pb.SearchRequest) *server.Args { if *text != "" { searchRequest.Text = *text } - if *name!= "" { - searchRequest.Name = []string{*name} + if *name != "" { + searchRequest.ClaimName = *name } if *claimType != "" { searchRequest.ClaimType = []string{*claimType} } if *id != "" { - searchRequest.XId = [][]byte{[]byte(*id)} + searchRequest.ClaimId = &pb.InvertibleField{Invert: false, Value: []string{*id}} } if *author != "" { - searchRequest.Author = []string{*author} + searchRequest.Author = *author } if *title != "" { - searchRequest.Title = []string{*title} + searchRequest.Title = *title } if *description != "" { - searchRequest.Description = []string{*description} + searchRequest.Description = *description } if *channelId != "" { searchRequest.ChannelId = &pb.InvertibleField{Invert: false, Value: []string{*channelId}} @@ -174,7 +175,6 @@ func main() { ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() - 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 6136a9c..8f0c92a 100644 --- a/protobuf/definitions/hub.proto +++ b/protobuf/definitions/hub.proto @@ -1,7 +1,6 @@ syntax = "proto3"; option go_package = "github.com/lbryio/hub/protobuf/go/pb"; -import "google/protobuf/wrappers.proto"; import "result.proto"; package pb; @@ -15,6 +14,14 @@ message InvertibleField { repeated string value = 2; } +message BoolValue { + bool value = 1; +} + +message UInt32Value { + uint32 value = 1; +} + message RangeField { enum Op { EQ = 0; @@ -28,69 +35,62 @@ message RangeField { } message SearchRequest { - string text = 1; - repeated string name = 2; - .google.protobuf.Int32Value amount_order = 3; - .google.protobuf.Int32Value limit = 4; + InvertibleField claim_id = 1; + InvertibleField channel_id = 2; + string text = 3; + uint32 limit = 4; repeated string order_by = 5; - .google.protobuf.Int32Value offset = 6; - .google.protobuf.BoolValue is_controlling = 7; - string last_take_over_height = 19; - InvertibleField claim_id = 20; - repeated string claim_name = 22; - repeated string normalized = 23; - RangeField tx_position = 24; - RangeField amount = 25; - RangeField timestamp = 26; - RangeField creation_timestamp = 27; - RangeField height = 28; - RangeField creation_height = 29; - RangeField activation_height = 30; - RangeField expiration_height = 31; - RangeField 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; - RangeField reposted = 39; - repeated string stream_type = 40; - repeated string media_type = 41; - RangeField fee_amount = 42; - repeated string fee_currency = 43; - RangeField duration = 44; - string reposted_claim_hash = 45; - RangeField censor_type = 46; - string claims_in_channel = 47; - RangeField channel_join = 48; - .google.protobuf.BoolValue signature_valid = 49; - RangeField effective_amount = 51; - RangeField support_amount = 52; - RangeField trending_group = 53; - RangeField trending_mixed = 54; - RangeField trending_local = 55; - RangeField trending_global = 56; - InvertibleField channel_id = 57; - InvertibleField channel_ids = 58; - repeated string tx_id = 59; - .google.protobuf.Int32Value tx_nout = 60; - repeated string signature = 61; - repeated string signature_digest = 62; - repeated string public_key_bytes = 63; - repeated string public_key_hash = 64; - string public_key_id = 65; - repeated bytes _id = 66; - repeated string any_tags = 67; - repeated string all_tags = 68; - repeated string not_tags = 69; - repeated string reposted_claim_id = 70; - .google.protobuf.BoolValue has_channel_signature = 71; - .google.protobuf.BoolValue has_source = 72; - .google.protobuf.Int32Value limit_claims_per_channel = 73; - repeated string any_languages = 74; - repeated string all_languages = 75; - .google.protobuf.BoolValue remove_duplicates = 76; - .google.protobuf.BoolValue no_totals = 77; - repeated string search_indices = 78; + uint32 offset = 6; + bool is_controlling = 7; + string last_take_over_height = 8; + string claim_name = 9; + string normalized_name = 10; + RangeField tx_position = 11; + RangeField amount = 12; + RangeField timestamp = 13; + RangeField creation_timestamp = 14; + RangeField height = 15; + RangeField creation_height = 16; + RangeField activation_height = 17; + RangeField expiration_height = 18; + RangeField release_time = 19; + string short_url = 20; + string canonical_url = 21; + string title = 22; + string author = 23; + string description = 24; + repeated string claim_type = 25; + RangeField repost_count = 26; + repeated string stream_type = 27; + repeated string media_type = 28; + RangeField fee_amount = 29; + string fee_currency = 30; + RangeField duration = 31; + string reposted_claim_id = 32; + RangeField censor_type = 33; + string claims_in_channel = 34; + RangeField channel_join = 35; + BoolValue is_signature_valid = 36; + RangeField effective_amount = 37; + RangeField support_amount = 38; + RangeField trending_group = 39; + RangeField trending_mixed = 40; + RangeField trending_local = 41; + RangeField trending_global = 42; + string tx_id = 43; + UInt32Value tx_nout = 44; + string signature = 45; + string signature_digest = 46; + string public_key_bytes = 47; + string public_key_id = 48; + repeated string any_tags = 49; + repeated string all_tags = 50; + repeated string not_tags = 51; + bool has_channel_signature = 52; + BoolValue has_source = 53; + uint32 limit_claims_per_channel = 54; + repeated string any_languages = 55; + repeated string all_languages = 56; + bool remove_duplicates = 57; + bool no_totals = 58; } \ No newline at end of file diff --git a/protobuf/go/hub.pb.go b/protobuf/go/hub.pb.go index adea913..773bce1 100644 --- a/protobuf/go/hub.pb.go +++ b/protobuf/go/hub.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.17.1 +// protoc v3.17.3 // source: hub.proto package pb @@ -9,7 +9,6 @@ package pb import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" reflect "reflect" sync "sync" ) @@ -73,7 +72,7 @@ func (x RangeField_Op) Number() protoreflect.EnumNumber { // Deprecated: Use RangeField_Op.Descriptor instead. func (RangeField_Op) EnumDescriptor() ([]byte, []int) { - return file_hub_proto_rawDescGZIP(), []int{1, 0} + return file_hub_proto_rawDescGZIP(), []int{3, 0} } type InvertibleField struct { @@ -131,6 +130,100 @@ func (x *InvertibleField) GetValue() []string { return nil } +type BoolValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value"` +} + +func (x *BoolValue) Reset() { + *x = BoolValue{} + if protoimpl.UnsafeEnabled { + mi := &file_hub_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BoolValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoolValue) ProtoMessage() {} + +func (x *BoolValue) ProtoReflect() protoreflect.Message { + mi := &file_hub_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BoolValue.ProtoReflect.Descriptor instead. +func (*BoolValue) Descriptor() ([]byte, []int) { + return file_hub_proto_rawDescGZIP(), []int{1} +} + +func (x *BoolValue) GetValue() bool { + if x != nil { + return x.Value + } + return false +} + +type UInt32Value struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value"` +} + +func (x *UInt32Value) Reset() { + *x = UInt32Value{} + if protoimpl.UnsafeEnabled { + mi := &file_hub_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UInt32Value) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UInt32Value) ProtoMessage() {} + +func (x *UInt32Value) ProtoReflect() protoreflect.Message { + mi := &file_hub_proto_msgTypes[2] + 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 UInt32Value.ProtoReflect.Descriptor instead. +func (*UInt32Value) Descriptor() ([]byte, []int) { + return file_hub_proto_rawDescGZIP(), []int{2} +} + +func (x *UInt32Value) GetValue() uint32 { + if x != nil { + return x.Value + } + return 0 +} + type RangeField struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -143,7 +236,7 @@ type RangeField struct { func (x *RangeField) Reset() { *x = RangeField{} if protoimpl.UnsafeEnabled { - mi := &file_hub_proto_msgTypes[1] + mi := &file_hub_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -156,7 +249,7 @@ func (x *RangeField) String() string { func (*RangeField) ProtoMessage() {} func (x *RangeField) ProtoReflect() protoreflect.Message { - mi := &file_hub_proto_msgTypes[1] + mi := &file_hub_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -169,7 +262,7 @@ func (x *RangeField) ProtoReflect() protoreflect.Message { // Deprecated: Use RangeField.ProtoReflect.Descriptor instead. func (*RangeField) Descriptor() ([]byte, []int) { - return file_hub_proto_rawDescGZIP(), []int{1} + return file_hub_proto_rawDescGZIP(), []int{3} } func (x *RangeField) GetOp() RangeField_Op { @@ -191,77 +284,70 @@ type SearchRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text"` - Name []string `protobuf:"bytes,2,rep,name=name,proto3" json:"name"` - AmountOrder *wrapperspb.Int32Value `protobuf:"bytes,3,opt,name=amount_order,json=amountOrder,proto3" json:"amount_order"` - Limit *wrapperspb.Int32Value `protobuf:"bytes,4,opt,name=limit,proto3" json:"limit"` - OrderBy []string `protobuf:"bytes,5,rep,name=order_by,json=orderBy,proto3" json:"order_by"` - Offset *wrapperspb.Int32Value `protobuf:"bytes,6,opt,name=offset,proto3" json:"offset"` - IsControlling *wrapperspb.BoolValue `protobuf:"bytes,7,opt,name=is_controlling,json=isControlling,proto3" json:"is_controlling"` - LastTakeOverHeight string `protobuf:"bytes,19,opt,name=last_take_over_height,json=lastTakeOverHeight,proto3" json:"last_take_over_height"` - ClaimId *InvertibleField `protobuf:"bytes,20,opt,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 *RangeField `protobuf:"bytes,24,opt,name=tx_position,json=txPosition,proto3" json:"tx_position"` - Amount *RangeField `protobuf:"bytes,25,opt,name=amount,proto3" json:"amount"` - Timestamp *RangeField `protobuf:"bytes,26,opt,name=timestamp,proto3" json:"timestamp"` - CreationTimestamp *RangeField `protobuf:"bytes,27,opt,name=creation_timestamp,json=creationTimestamp,proto3" json:"creation_timestamp"` - Height *RangeField `protobuf:"bytes,28,opt,name=height,proto3" json:"height"` - CreationHeight *RangeField `protobuf:"bytes,29,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height"` - ActivationHeight *RangeField `protobuf:"bytes,30,opt,name=activation_height,json=activationHeight,proto3" json:"activation_height"` - ExpirationHeight *RangeField `protobuf:"bytes,31,opt,name=expiration_height,json=expirationHeight,proto3" json:"expiration_height"` - ReleaseTime *RangeField `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 *RangeField `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 *RangeField `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 *RangeField `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 *RangeField `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 *RangeField `protobuf:"bytes,48,opt,name=channel_join,json=channelJoin,proto3" json:"channel_join"` - SignatureValid *wrapperspb.BoolValue `protobuf:"bytes,49,opt,name=signature_valid,json=signatureValid,proto3" json:"signature_valid"` - EffectiveAmount *RangeField `protobuf:"bytes,51,opt,name=effective_amount,json=effectiveAmount,proto3" json:"effective_amount"` - SupportAmount *RangeField `protobuf:"bytes,52,opt,name=support_amount,json=supportAmount,proto3" json:"support_amount"` - TrendingGroup *RangeField `protobuf:"bytes,53,opt,name=trending_group,json=trendingGroup,proto3" json:"trending_group"` - TrendingMixed *RangeField `protobuf:"bytes,54,opt,name=trending_mixed,json=trendingMixed,proto3" json:"trending_mixed"` - TrendingLocal *RangeField `protobuf:"bytes,55,opt,name=trending_local,json=trendingLocal,proto3" json:"trending_local"` - TrendingGlobal *RangeField `protobuf:"bytes,56,opt,name=trending_global,json=trendingGlobal,proto3" json:"trending_global"` - ChannelId *InvertibleField `protobuf:"bytes,57,opt,name=channel_id,json=channelId,proto3" json:"channel_id"` - ChannelIds *InvertibleField `protobuf:"bytes,58,opt,name=channel_ids,json=channelIds,proto3" json:"channel_ids"` - TxId []string `protobuf:"bytes,59,rep,name=tx_id,json=txId,proto3" json:"tx_id"` - TxNout *wrapperspb.Int32Value `protobuf:"bytes,60,opt,name=tx_nout,json=txNout,proto3" json:"tx_nout"` - Signature []string `protobuf:"bytes,61,rep,name=signature,proto3" json:"signature"` - SignatureDigest []string `protobuf:"bytes,62,rep,name=signature_digest,json=signatureDigest,proto3" json:"signature_digest"` - PublicKeyBytes []string `protobuf:"bytes,63,rep,name=public_key_bytes,json=publicKeyBytes,proto3" json:"public_key_bytes"` - PublicKeyHash []string `protobuf:"bytes,64,rep,name=public_key_hash,json=publicKeyHash,proto3" json:"public_key_hash"` - PublicKeyId string `protobuf:"bytes,65,opt,name=public_key_id,json=publicKeyId,proto3" json:"public_key_id"` - XId [][]byte `protobuf:"bytes,66,rep,name=_id,json=Id,proto3" json:"_id"` - AnyTags []string `protobuf:"bytes,67,rep,name=any_tags,json=anyTags,proto3" json:"any_tags"` - AllTags []string `protobuf:"bytes,68,rep,name=all_tags,json=allTags,proto3" json:"all_tags"` - NotTags []string `protobuf:"bytes,69,rep,name=not_tags,json=notTags,proto3" json:"not_tags"` - RepostedClaimId []string `protobuf:"bytes,70,rep,name=reposted_claim_id,json=repostedClaimId,proto3" json:"reposted_claim_id"` - HasChannelSignature *wrapperspb.BoolValue `protobuf:"bytes,71,opt,name=has_channel_signature,json=hasChannelSignature,proto3" json:"has_channel_signature"` - HasSource *wrapperspb.BoolValue `protobuf:"bytes,72,opt,name=has_source,json=hasSource,proto3" json:"has_source"` - LimitClaimsPerChannel *wrapperspb.Int32Value `protobuf:"bytes,73,opt,name=limit_claims_per_channel,json=limitClaimsPerChannel,proto3" json:"limit_claims_per_channel"` - AnyLanguages []string `protobuf:"bytes,74,rep,name=any_languages,json=anyLanguages,proto3" json:"any_languages"` - AllLanguages []string `protobuf:"bytes,75,rep,name=all_languages,json=allLanguages,proto3" json:"all_languages"` - RemoveDuplicates *wrapperspb.BoolValue `protobuf:"bytes,76,opt,name=remove_duplicates,json=removeDuplicates,proto3" json:"remove_duplicates"` - NoTotals *wrapperspb.BoolValue `protobuf:"bytes,77,opt,name=no_totals,json=noTotals,proto3" json:"no_totals"` - SearchIndices []string `protobuf:"bytes,78,rep,name=search_indices,json=searchIndices,proto3" json:"search_indices"` + ClaimId *InvertibleField `protobuf:"bytes,1,opt,name=claim_id,json=claimId,proto3" json:"claim_id"` + ChannelId *InvertibleField `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id"` + Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text"` + Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit"` + OrderBy []string `protobuf:"bytes,5,rep,name=order_by,json=orderBy,proto3" json:"order_by"` + Offset uint32 `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,8,opt,name=last_take_over_height,json=lastTakeOverHeight,proto3" json:"last_take_over_height"` + ClaimName string `protobuf:"bytes,9,opt,name=claim_name,json=claimName,proto3" json:"claim_name"` + NormalizedName string `protobuf:"bytes,10,opt,name=normalized_name,json=normalizedName,proto3" json:"normalized_name"` + TxPosition *RangeField `protobuf:"bytes,11,opt,name=tx_position,json=txPosition,proto3" json:"tx_position"` + Amount *RangeField `protobuf:"bytes,12,opt,name=amount,proto3" json:"amount"` + Timestamp *RangeField `protobuf:"bytes,13,opt,name=timestamp,proto3" json:"timestamp"` + CreationTimestamp *RangeField `protobuf:"bytes,14,opt,name=creation_timestamp,json=creationTimestamp,proto3" json:"creation_timestamp"` + Height *RangeField `protobuf:"bytes,15,opt,name=height,proto3" json:"height"` + CreationHeight *RangeField `protobuf:"bytes,16,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height"` + ActivationHeight *RangeField `protobuf:"bytes,17,opt,name=activation_height,json=activationHeight,proto3" json:"activation_height"` + ExpirationHeight *RangeField `protobuf:"bytes,18,opt,name=expiration_height,json=expirationHeight,proto3" json:"expiration_height"` + ReleaseTime *RangeField `protobuf:"bytes,19,opt,name=release_time,json=releaseTime,proto3" json:"release_time"` + ShortUrl string `protobuf:"bytes,20,opt,name=short_url,json=shortUrl,proto3" json:"short_url"` + CanonicalUrl string `protobuf:"bytes,21,opt,name=canonical_url,json=canonicalUrl,proto3" json:"canonical_url"` + Title string `protobuf:"bytes,22,opt,name=title,proto3" json:"title"` + Author string `protobuf:"bytes,23,opt,name=author,proto3" json:"author"` + Description string `protobuf:"bytes,24,opt,name=description,proto3" json:"description"` + ClaimType []string `protobuf:"bytes,25,rep,name=claim_type,json=claimType,proto3" json:"claim_type"` + RepostCount *RangeField `protobuf:"bytes,26,opt,name=repost_count,json=repostCount,proto3" json:"repost_count"` + StreamType []string `protobuf:"bytes,27,rep,name=stream_type,json=streamType,proto3" json:"stream_type"` + MediaType []string `protobuf:"bytes,28,rep,name=media_type,json=mediaType,proto3" json:"media_type"` + FeeAmount *RangeField `protobuf:"bytes,29,opt,name=fee_amount,json=feeAmount,proto3" json:"fee_amount"` + FeeCurrency string `protobuf:"bytes,30,opt,name=fee_currency,json=feeCurrency,proto3" json:"fee_currency"` + Duration *RangeField `protobuf:"bytes,31,opt,name=duration,proto3" json:"duration"` + RepostedClaimId string `protobuf:"bytes,32,opt,name=reposted_claim_id,json=repostedClaimId,proto3" json:"reposted_claim_id"` + CensorType *RangeField `protobuf:"bytes,33,opt,name=censor_type,json=censorType,proto3" json:"censor_type"` + ClaimsInChannel string `protobuf:"bytes,34,opt,name=claims_in_channel,json=claimsInChannel,proto3" json:"claims_in_channel"` + ChannelJoin *RangeField `protobuf:"bytes,35,opt,name=channel_join,json=channelJoin,proto3" json:"channel_join"` + IsSignatureValid *BoolValue `protobuf:"bytes,36,opt,name=is_signature_valid,json=isSignatureValid,proto3" json:"is_signature_valid"` + EffectiveAmount *RangeField `protobuf:"bytes,37,opt,name=effective_amount,json=effectiveAmount,proto3" json:"effective_amount"` + SupportAmount *RangeField `protobuf:"bytes,38,opt,name=support_amount,json=supportAmount,proto3" json:"support_amount"` + TrendingGroup *RangeField `protobuf:"bytes,39,opt,name=trending_group,json=trendingGroup,proto3" json:"trending_group"` + TrendingMixed *RangeField `protobuf:"bytes,40,opt,name=trending_mixed,json=trendingMixed,proto3" json:"trending_mixed"` + TrendingLocal *RangeField `protobuf:"bytes,41,opt,name=trending_local,json=trendingLocal,proto3" json:"trending_local"` + TrendingGlobal *RangeField `protobuf:"bytes,42,opt,name=trending_global,json=trendingGlobal,proto3" json:"trending_global"` + TxId string `protobuf:"bytes,43,opt,name=tx_id,json=txId,proto3" json:"tx_id"` + TxNout *UInt32Value `protobuf:"bytes,44,opt,name=tx_nout,json=txNout,proto3" json:"tx_nout"` + Signature string `protobuf:"bytes,45,opt,name=signature,proto3" json:"signature"` + SignatureDigest string `protobuf:"bytes,46,opt,name=signature_digest,json=signatureDigest,proto3" json:"signature_digest"` + PublicKeyBytes string `protobuf:"bytes,47,opt,name=public_key_bytes,json=publicKeyBytes,proto3" json:"public_key_bytes"` + PublicKeyId string `protobuf:"bytes,48,opt,name=public_key_id,json=publicKeyId,proto3" json:"public_key_id"` + AnyTags []string `protobuf:"bytes,49,rep,name=any_tags,json=anyTags,proto3" json:"any_tags"` + AllTags []string `protobuf:"bytes,50,rep,name=all_tags,json=allTags,proto3" json:"all_tags"` + NotTags []string `protobuf:"bytes,51,rep,name=not_tags,json=notTags,proto3" json:"not_tags"` + HasChannelSignature bool `protobuf:"varint,52,opt,name=has_channel_signature,json=hasChannelSignature,proto3" json:"has_channel_signature"` + HasSource *BoolValue `protobuf:"bytes,53,opt,name=has_source,json=hasSource,proto3" json:"has_source"` + LimitClaimsPerChannel uint32 `protobuf:"varint,54,opt,name=limit_claims_per_channel,json=limitClaimsPerChannel,proto3" json:"limit_claims_per_channel"` + AnyLanguages []string `protobuf:"bytes,55,rep,name=any_languages,json=anyLanguages,proto3" json:"any_languages"` + AllLanguages []string `protobuf:"bytes,56,rep,name=all_languages,json=allLanguages,proto3" json:"all_languages"` + RemoveDuplicates bool `protobuf:"varint,57,opt,name=remove_duplicates,json=removeDuplicates,proto3" json:"remove_duplicates"` + NoTotals bool `protobuf:"varint,58,opt,name=no_totals,json=noTotals,proto3" json:"no_totals"` } func (x *SearchRequest) Reset() { *x = SearchRequest{} if protoimpl.UnsafeEnabled { - mi := &file_hub_proto_msgTypes[2] + mi := &file_hub_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -274,7 +360,7 @@ func (x *SearchRequest) String() string { func (*SearchRequest) ProtoMessage() {} func (x *SearchRequest) ProtoReflect() protoreflect.Message { - mi := &file_hub_proto_msgTypes[2] + mi := &file_hub_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -287,63 +373,7 @@ func (x *SearchRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead. func (*SearchRequest) Descriptor() ([]byte, []int) { - return file_hub_proto_rawDescGZIP(), []int{2} -} - -func (x *SearchRequest) GetText() string { - if x != nil { - return x.Text - } - return "" -} - -func (x *SearchRequest) GetName() []string { - if x != nil { - return x.Name - } - return nil -} - -func (x *SearchRequest) GetAmountOrder() *wrapperspb.Int32Value { - if x != nil { - return x.AmountOrder - } - return nil -} - -func (x *SearchRequest) GetLimit() *wrapperspb.Int32Value { - if x != nil { - return x.Limit - } - return nil -} - -func (x *SearchRequest) GetOrderBy() []string { - if x != nil { - return x.OrderBy - } - return nil -} - -func (x *SearchRequest) GetOffset() *wrapperspb.Int32Value { - if x != nil { - return x.Offset - } - return nil -} - -func (x *SearchRequest) GetIsControlling() *wrapperspb.BoolValue { - if x != nil { - return x.IsControlling - } - return nil -} - -func (x *SearchRequest) GetLastTakeOverHeight() string { - if x != nil { - return x.LastTakeOverHeight - } - return "" + return file_hub_proto_rawDescGZIP(), []int{4} } func (x *SearchRequest) GetClaimId() *InvertibleField { @@ -353,20 +383,69 @@ func (x *SearchRequest) GetClaimId() *InvertibleField { return nil } -func (x *SearchRequest) GetClaimName() []string { +func (x *SearchRequest) GetChannelId() *InvertibleField { if x != nil { - return x.ClaimName + return x.ChannelId } return nil } -func (x *SearchRequest) GetNormalized() []string { +func (x *SearchRequest) GetText() string { if x != nil { - return x.Normalized + return x.Text + } + return "" +} + +func (x *SearchRequest) GetLimit() uint32 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *SearchRequest) GetOrderBy() []string { + if x != nil { + return x.OrderBy } return nil } +func (x *SearchRequest) GetOffset() uint32 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *SearchRequest) GetIsControlling() bool { + if x != nil { + return x.IsControlling + } + return false +} + +func (x *SearchRequest) GetLastTakeOverHeight() string { + if x != nil { + return x.LastTakeOverHeight + } + return "" +} + +func (x *SearchRequest) GetClaimName() string { + if x != nil { + return x.ClaimName + } + return "" +} + +func (x *SearchRequest) GetNormalizedName() string { + if x != nil { + return x.NormalizedName + } + return "" +} + func (x *SearchRequest) GetTxPosition() *RangeField { if x != nil { return x.TxPosition @@ -430,39 +509,39 @@ func (x *SearchRequest) GetReleaseTime() *RangeField { return nil } -func (x *SearchRequest) GetShortUrl() []string { +func (x *SearchRequest) GetShortUrl() string { if x != nil { return x.ShortUrl } - return nil + return "" } -func (x *SearchRequest) GetCanonicalUrl() []string { +func (x *SearchRequest) GetCanonicalUrl() string { if x != nil { return x.CanonicalUrl } - return nil + return "" } -func (x *SearchRequest) GetTitle() []string { +func (x *SearchRequest) GetTitle() string { if x != nil { return x.Title } - return nil + return "" } -func (x *SearchRequest) GetAuthor() []string { +func (x *SearchRequest) GetAuthor() string { if x != nil { return x.Author } - return nil + return "" } -func (x *SearchRequest) GetDescription() []string { +func (x *SearchRequest) GetDescription() string { if x != nil { return x.Description } - return nil + return "" } func (x *SearchRequest) GetClaimType() []string { @@ -472,9 +551,9 @@ func (x *SearchRequest) GetClaimType() []string { return nil } -func (x *SearchRequest) GetReposted() *RangeField { +func (x *SearchRequest) GetRepostCount() *RangeField { if x != nil { - return x.Reposted + return x.RepostCount } return nil } @@ -500,11 +579,11 @@ func (x *SearchRequest) GetFeeAmount() *RangeField { return nil } -func (x *SearchRequest) GetFeeCurrency() []string { +func (x *SearchRequest) GetFeeCurrency() string { if x != nil { return x.FeeCurrency } - return nil + return "" } func (x *SearchRequest) GetDuration() *RangeField { @@ -514,9 +593,9 @@ func (x *SearchRequest) GetDuration() *RangeField { return nil } -func (x *SearchRequest) GetRepostedClaimHash() string { +func (x *SearchRequest) GetRepostedClaimId() string { if x != nil { - return x.RepostedClaimHash + return x.RepostedClaimId } return "" } @@ -542,9 +621,9 @@ func (x *SearchRequest) GetChannelJoin() *RangeField { return nil } -func (x *SearchRequest) GetSignatureValid() *wrapperspb.BoolValue { +func (x *SearchRequest) GetIsSignatureValid() *BoolValue { if x != nil { - return x.SignatureValid + return x.IsSignatureValid } return nil } @@ -591,60 +670,39 @@ func (x *SearchRequest) GetTrendingGlobal() *RangeField { return nil } -func (x *SearchRequest) GetChannelId() *InvertibleField { - if x != nil { - return x.ChannelId - } - return nil -} - -func (x *SearchRequest) GetChannelIds() *InvertibleField { - if x != nil { - return x.ChannelIds - } - return nil -} - -func (x *SearchRequest) GetTxId() []string { +func (x *SearchRequest) GetTxId() string { if x != nil { return x.TxId } - return nil + return "" } -func (x *SearchRequest) GetTxNout() *wrapperspb.Int32Value { +func (x *SearchRequest) GetTxNout() *UInt32Value { if x != nil { return x.TxNout } return nil } -func (x *SearchRequest) GetSignature() []string { +func (x *SearchRequest) GetSignature() string { if x != nil { return x.Signature } - return nil + return "" } -func (x *SearchRequest) GetSignatureDigest() []string { +func (x *SearchRequest) GetSignatureDigest() string { if x != nil { return x.SignatureDigest } - return nil + return "" } -func (x *SearchRequest) GetPublicKeyBytes() []string { +func (x *SearchRequest) GetPublicKeyBytes() string { if x != nil { return x.PublicKeyBytes } - return nil -} - -func (x *SearchRequest) GetPublicKeyHash() []string { - if x != nil { - return x.PublicKeyHash - } - return nil + return "" } func (x *SearchRequest) GetPublicKeyId() string { @@ -654,13 +712,6 @@ func (x *SearchRequest) GetPublicKeyId() string { return "" } -func (x *SearchRequest) GetXId() [][]byte { - if x != nil { - return x.XId - } - return nil -} - func (x *SearchRequest) GetAnyTags() []string { if x != nil { return x.AnyTags @@ -682,32 +733,25 @@ func (x *SearchRequest) GetNotTags() []string { return nil } -func (x *SearchRequest) GetRepostedClaimId() []string { - if x != nil { - return x.RepostedClaimId - } - return nil -} - -func (x *SearchRequest) GetHasChannelSignature() *wrapperspb.BoolValue { +func (x *SearchRequest) GetHasChannelSignature() bool { if x != nil { return x.HasChannelSignature } - return nil + return false } -func (x *SearchRequest) GetHasSource() *wrapperspb.BoolValue { +func (x *SearchRequest) GetHasSource() *BoolValue { if x != nil { return x.HasSource } return nil } -func (x *SearchRequest) GetLimitClaimsPerChannel() *wrapperspb.Int32Value { +func (x *SearchRequest) GetLimitClaimsPerChannel() uint32 { if x != nil { return x.LimitClaimsPerChannel } - return nil + return 0 } func (x *SearchRequest) GetAnyLanguages() []string { @@ -724,236 +768,200 @@ func (x *SearchRequest) GetAllLanguages() []string { return nil } -func (x *SearchRequest) GetRemoveDuplicates() *wrapperspb.BoolValue { +func (x *SearchRequest) GetRemoveDuplicates() bool { if x != nil { return x.RemoveDuplicates } - return nil + return false } -func (x *SearchRequest) GetNoTotals() *wrapperspb.BoolValue { +func (x *SearchRequest) GetNoTotals() bool { if x != nil { return x.NoTotals } - return nil -} - -func (x *SearchRequest) GetSearchIndices() []string { - if x != nil { - return x.SearchIndices - } - return nil + return false } 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, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3f, 0x0a, 0x0f, 0x49, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x75, - 0x0a, 0x0a, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x02, - 0x6f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0xf9, 0x16, 0x0a, 0x0d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x3e, 0x0a, 0x0c, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x0b, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, - 0x31, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x33, 0x0a, - 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x12, 0x41, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, - 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 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, 0x13, - 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, 0x2e, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x69, - 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62, 0x2e, - 0x49, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x2c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x1a, 0x20, + 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x21, + 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0x23, 0x0a, 0x0b, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x75, 0x0a, 0x0a, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, + 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, 0x87, 0x13, + 0x0a, 0x0d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x2e, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x6c, + 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x49, 0x64, 0x12, + 0x32, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, + 0x62, 0x6c, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, + 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x05, 0x20, 0x03, 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, 0x0d, 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, 0x08, 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, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, + 0x61, 0x69, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6e, 0x6f, 0x72, + 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x0b, 0x74, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, + 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0a, 0x74, 0x78, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x46, 0x69, - 0x65, 0x6c, 0x64, 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, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, + 0x65, 0x6c, 0x64, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, + 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x11, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x46, + 0x69, 0x65, 0x6c, 0x64, 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, 0x12, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, + 0x64, 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, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x14, 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, 0x15, 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, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x17, 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, 0x18, 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, 0x19, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, + 0x61, 0x69, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x31, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, + 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0b, 0x72, + 0x65, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x1b, 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, 0x1c, 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, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x1e, 0x20, 0x01, 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, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x6e, - 0x65, 0x6c, 0x4a, 0x6f, 0x69, 0x6e, 0x12, 0x43, 0x0a, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x31, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 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, - 0x33, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x34, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, - 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, - 0x35, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x36, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, - 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x37, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x46, 0x69, - 0x65, 0x6c, 0x64, 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, 0x38, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, - 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0e, 0x74, 0x72, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x12, 0x32, 0x0a, 0x0a, 0x63, - 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x39, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, - 0x34, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x3a, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x76, 0x65, 0x72, 0x74, - 0x69, 0x62, 0x6c, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, - 0x65, 0x6c, 0x49, 0x64, 0x73, 0x12, 0x13, 0x0a, 0x05, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x3b, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x07, 0x74, 0x78, - 0x5f, 0x6e, 0x6f, 0x75, 0x74, 0x18, 0x3c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x20, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x61, + 0x69, 0x6d, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x0b, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x22, 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, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, + 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, + 0x4a, 0x6f, 0x69, 0x6e, 0x12, 0x3b, 0x0a, 0x12, 0x69, 0x73, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x10, 0x69, 0x73, 0x53, 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, 0x25, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, + 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x26, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x46, + 0x69, 0x65, 0x6c, 0x64, 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, 0x27, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, + 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x28, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x65, + 0x6c, 0x64, 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, 0x29, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x2a, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x52, 0x0e, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x47, 0x6c, 0x6f, 0x62, 0x61, + 0x6c, 0x12, 0x13, 0x0a, 0x05, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x2b, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x74, 0x78, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x6e, 0x6f, 0x75, + 0x74, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x74, 0x78, 0x4e, 0x6f, 0x75, 0x74, - 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x3d, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x29, + 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x2d, 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, 0x3e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x73, 0x74, 0x18, 0x2e, 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, 0x3f, 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, 0x40, 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, 0x41, 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, 0x42, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x02, 0x49, 0x64, - 0x12, 0x19, 0x0a, 0x08, 0x61, 0x6e, 0x79, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x43, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x07, 0x61, 0x6e, 0x79, 0x54, 0x61, 0x67, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x61, - 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x44, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x6c, 0x6c, 0x54, 0x61, 0x67, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x74, 0x5f, 0x74, 0x61, - 0x67, 0x73, 0x18, 0x45, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x74, 0x54, 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, 0x46, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, - 0x70, 0x6f, 0x73, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x49, 0x64, 0x12, 0x4e, 0x0a, - 0x15, 0x68, 0x61, 0x73, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x47, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, - 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x68, 0x61, 0x73, 0x43, 0x68, 0x61, - 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x39, 0x0a, - 0x0a, 0x68, 0x61, 0x73, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x48, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x68, - 0x61, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x54, 0x0a, 0x18, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, - 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x49, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, - 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x15, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6c, - 0x61, 0x69, 0x6d, 0x73, 0x50, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x23, - 0x0a, 0x0d, 0x61, 0x6e, 0x79, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x18, - 0x4a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6e, 0x79, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, - 0x67, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, - 0x61, 0x67, 0x65, 0x73, 0x18, 0x4b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x4c, - 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x11, 0x72, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x5f, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, 0x4c, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x10, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x73, 0x12, 0x37, 0x0a, 0x09, 0x6e, 0x6f, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x18, 0x4d, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x08, 0x6e, 0x6f, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x4e, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, - 0x73, 0x32, 0x31, 0x0a, 0x03, 0x48, 0x75, 0x62, 0x12, 0x2a, 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, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x73, 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, + 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x2f, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x30, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x6e, 0x79, 0x5f, 0x74, + 0x61, 0x67, 0x73, 0x18, 0x31, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x6e, 0x79, 0x54, 0x61, + 0x67, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x32, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x6c, 0x54, 0x61, 0x67, 0x73, 0x12, 0x19, 0x0a, + 0x08, 0x6e, 0x6f, 0x74, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x33, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x07, 0x6e, 0x6f, 0x74, 0x54, 0x61, 0x67, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x68, 0x61, 0x73, 0x5f, + 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x34, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x68, 0x61, 0x73, 0x43, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2c, 0x0a, 0x0a, + 0x68, 0x61, 0x73, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x35, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x09, 0x68, 0x61, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, + 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x36, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x50, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6e, 0x79, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, + 0x61, 0x67, 0x65, 0x73, 0x18, 0x37, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6e, 0x79, 0x4c, + 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x5f, + 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x18, 0x38, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0c, 0x61, 0x6c, 0x6c, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x12, 0x2b, 0x0a, + 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x73, 0x18, 0x39, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, + 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x18, 0x3a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, + 0x6f, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x32, 0x31, 0x0a, 0x03, 0x48, 0x75, 0x62, 0x12, 0x2a, + 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, 0x0b, 0x2e, 0x70, 0x62, + 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 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 ( @@ -969,59 +977,50 @@ func file_hub_proto_rawDescGZIP() []byte { } var file_hub_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_hub_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_hub_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_hub_proto_goTypes = []interface{}{ - (RangeField_Op)(0), // 0: pb.RangeField.Op - (*InvertibleField)(nil), // 1: pb.InvertibleField - (*RangeField)(nil), // 2: pb.RangeField - (*SearchRequest)(nil), // 3: pb.SearchRequest - (*wrapperspb.Int32Value)(nil), // 4: google.protobuf.Int32Value - (*wrapperspb.BoolValue)(nil), // 5: google.protobuf.BoolValue - (*Outputs)(nil), // 6: pb.Outputs + (RangeField_Op)(0), // 0: pb.RangeField.Op + (*InvertibleField)(nil), // 1: pb.InvertibleField + (*BoolValue)(nil), // 2: pb.BoolValue + (*UInt32Value)(nil), // 3: pb.UInt32Value + (*RangeField)(nil), // 4: pb.RangeField + (*SearchRequest)(nil), // 5: pb.SearchRequest + (*Outputs)(nil), // 6: pb.Outputs } var file_hub_proto_depIdxs = []int32{ 0, // 0: pb.RangeField.op:type_name -> pb.RangeField.Op - 4, // 1: pb.SearchRequest.amount_order:type_name -> google.protobuf.Int32Value - 4, // 2: pb.SearchRequest.limit:type_name -> google.protobuf.Int32Value - 4, // 3: pb.SearchRequest.offset:type_name -> google.protobuf.Int32Value - 5, // 4: pb.SearchRequest.is_controlling:type_name -> google.protobuf.BoolValue - 1, // 5: pb.SearchRequest.claim_id:type_name -> pb.InvertibleField - 2, // 6: pb.SearchRequest.tx_position:type_name -> pb.RangeField - 2, // 7: pb.SearchRequest.amount:type_name -> pb.RangeField - 2, // 8: pb.SearchRequest.timestamp:type_name -> pb.RangeField - 2, // 9: pb.SearchRequest.creation_timestamp:type_name -> pb.RangeField - 2, // 10: pb.SearchRequest.height:type_name -> pb.RangeField - 2, // 11: pb.SearchRequest.creation_height:type_name -> pb.RangeField - 2, // 12: pb.SearchRequest.activation_height:type_name -> pb.RangeField - 2, // 13: pb.SearchRequest.expiration_height:type_name -> pb.RangeField - 2, // 14: pb.SearchRequest.release_time:type_name -> pb.RangeField - 2, // 15: pb.SearchRequest.reposted:type_name -> pb.RangeField - 2, // 16: pb.SearchRequest.fee_amount:type_name -> pb.RangeField - 2, // 17: pb.SearchRequest.duration:type_name -> pb.RangeField - 2, // 18: pb.SearchRequest.censor_type:type_name -> pb.RangeField - 2, // 19: pb.SearchRequest.channel_join:type_name -> pb.RangeField - 5, // 20: pb.SearchRequest.signature_valid:type_name -> google.protobuf.BoolValue - 2, // 21: pb.SearchRequest.effective_amount:type_name -> pb.RangeField - 2, // 22: pb.SearchRequest.support_amount:type_name -> pb.RangeField - 2, // 23: pb.SearchRequest.trending_group:type_name -> pb.RangeField - 2, // 24: pb.SearchRequest.trending_mixed:type_name -> pb.RangeField - 2, // 25: pb.SearchRequest.trending_local:type_name -> pb.RangeField - 2, // 26: pb.SearchRequest.trending_global:type_name -> pb.RangeField - 1, // 27: pb.SearchRequest.channel_id:type_name -> pb.InvertibleField - 1, // 28: pb.SearchRequest.channel_ids:type_name -> pb.InvertibleField - 4, // 29: pb.SearchRequest.tx_nout:type_name -> google.protobuf.Int32Value - 5, // 30: pb.SearchRequest.has_channel_signature:type_name -> google.protobuf.BoolValue - 5, // 31: pb.SearchRequest.has_source:type_name -> google.protobuf.BoolValue - 4, // 32: pb.SearchRequest.limit_claims_per_channel:type_name -> google.protobuf.Int32Value - 5, // 33: pb.SearchRequest.remove_duplicates:type_name -> google.protobuf.BoolValue - 5, // 34: pb.SearchRequest.no_totals:type_name -> google.protobuf.BoolValue - 3, // 35: pb.Hub.Search:input_type -> pb.SearchRequest - 6, // 36: pb.Hub.Search:output_type -> pb.Outputs - 36, // [36:37] is the sub-list for method output_type - 35, // [35:36] is the sub-list for method input_type - 35, // [35:35] is the sub-list for extension type_name - 35, // [35:35] is the sub-list for extension extendee - 0, // [0:35] is the sub-list for field type_name + 1, // 1: pb.SearchRequest.claim_id:type_name -> pb.InvertibleField + 1, // 2: pb.SearchRequest.channel_id:type_name -> pb.InvertibleField + 4, // 3: pb.SearchRequest.tx_position:type_name -> pb.RangeField + 4, // 4: pb.SearchRequest.amount:type_name -> pb.RangeField + 4, // 5: pb.SearchRequest.timestamp:type_name -> pb.RangeField + 4, // 6: pb.SearchRequest.creation_timestamp:type_name -> pb.RangeField + 4, // 7: pb.SearchRequest.height:type_name -> pb.RangeField + 4, // 8: pb.SearchRequest.creation_height:type_name -> pb.RangeField + 4, // 9: pb.SearchRequest.activation_height:type_name -> pb.RangeField + 4, // 10: pb.SearchRequest.expiration_height:type_name -> pb.RangeField + 4, // 11: pb.SearchRequest.release_time:type_name -> pb.RangeField + 4, // 12: pb.SearchRequest.repost_count:type_name -> pb.RangeField + 4, // 13: pb.SearchRequest.fee_amount:type_name -> pb.RangeField + 4, // 14: pb.SearchRequest.duration:type_name -> pb.RangeField + 4, // 15: pb.SearchRequest.censor_type:type_name -> pb.RangeField + 4, // 16: pb.SearchRequest.channel_join:type_name -> pb.RangeField + 2, // 17: pb.SearchRequest.is_signature_valid:type_name -> pb.BoolValue + 4, // 18: pb.SearchRequest.effective_amount:type_name -> pb.RangeField + 4, // 19: pb.SearchRequest.support_amount:type_name -> pb.RangeField + 4, // 20: pb.SearchRequest.trending_group:type_name -> pb.RangeField + 4, // 21: pb.SearchRequest.trending_mixed:type_name -> pb.RangeField + 4, // 22: pb.SearchRequest.trending_local:type_name -> pb.RangeField + 4, // 23: pb.SearchRequest.trending_global:type_name -> pb.RangeField + 3, // 24: pb.SearchRequest.tx_nout:type_name -> pb.UInt32Value + 2, // 25: pb.SearchRequest.has_source:type_name -> pb.BoolValue + 5, // 26: pb.Hub.Search:input_type -> pb.SearchRequest + 6, // 27: pb.Hub.Search:output_type -> pb.Outputs + 27, // [27:28] is the sub-list for method output_type + 26, // [26:27] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_hub_proto_init() } @@ -1044,7 +1043,7 @@ func file_hub_proto_init() { } } file_hub_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RangeField); i { + switch v := v.(*BoolValue); i { case 0: return &v.state case 1: @@ -1056,6 +1055,30 @@ func file_hub_proto_init() { } } file_hub_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UInt32Value); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hub_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RangeField); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hub_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SearchRequest); i { case 0: return &v.state @@ -1074,7 +1097,7 @@ func file_hub_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_hub_proto_rawDesc, NumEnums: 1, - NumMessages: 3, + NumMessages: 5, NumExtensions: 0, NumServices: 1, }, diff --git a/protobuf/go/result.pb.go b/protobuf/go/result.pb.go index df77a4c..ce22ab9 100644 --- a/protobuf/go/result.pb.go +++ b/protobuf/go/result.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.17.1 +// protoc v3.17.3 // source: result.proto package pb diff --git a/server/search.go b/server/search.go index 5d8ef22..8873374 100644 --- a/server/search.go +++ b/server/search.go @@ -4,16 +4,17 @@ import ( "context" "encoding/hex" "encoding/json" + "errors" "fmt" "log" "math" "reflect" "strings" + "time" //"github.com/lbryio/hub/schema" "github.com/btcsuite/btcutil/base58" - "github.com/golang/protobuf/ptypes/wrappers" pb "github.com/lbryio/hub/protobuf/go" "github.com/lbryio/lbry.go/v2/extras/util" "github.com/olivere/elastic/v7" @@ -25,30 +26,30 @@ import ( const DefaultSearchSize = 1000 type record struct { - Txid string `json:"tx_id"` - Nout uint32 `json:"tx_nout"` - Height uint32 `json:"height"` - ClaimId string `json:"claim_id"` - ChannelId string `json:"channel_id"` - RepostedClaimId string `json:"reposted_claim_id"` - CensorType uint32 `json:"censor_type"` - CensoringChannelHash string `json:"censoring_channel_hash"` - ShortUrl string `json:"short_url"` - CanonicalUrl string `json:"canonical_url"` - IsControlling bool `json:"is_controlling"` - TakeOverHeight uint32 `json:"last_take_over_height"` - CreationHeight uint32 `json:"creation_height"` - ActivationHeight uint32 `json:"activation_height"` - ExpirationHeight uint32 `json:"expiration_height"` - ClaimsInChannel uint32 `json:"claims_in_channel"` - Reposted uint32 `json:"reposted"` - EffectiveAmount uint64 `json:"effective_amount"` - SupportAmount uint64 `json:"support_amount"` - TrendingGroup uint32 `json:"trending_group"` - TrendingMixed float32 `json:"trending_mixed"` - TrendingLocal float32 `json:"trending_local"` - TrendingGlobal float32 `json:"trending_global"` - Name string `json:"name"` + Txid string `json:"tx_id"` + Nout uint32 `json:"tx_nout"` + Height uint32 `json:"height"` + ClaimId string `json:"claim_id"` + ChannelId string `json:"channel_id"` + RepostedClaimId string `json:"reposted_claim_id"` + CensorType uint32 `json:"censor_type"` + CensoringChannelId string `json:"censoring_channel_id"` + ShortUrl string `json:"short_url"` + CanonicalUrl string `json:"canonical_url"` + IsControlling bool `json:"is_controlling"` + TakeOverHeight uint32 `json:"last_take_over_height"` + CreationHeight uint32 `json:"creation_height"` + ActivationHeight uint32 `json:"activation_height"` + ExpirationHeight uint32 `json:"expiration_height"` + ClaimsInChannel uint32 `json:"claims_in_channel"` + Reposted uint32 `json:"repost_count"` + EffectiveAmount uint64 `json:"effective_amount"` + SupportAmount uint64 `json:"support_amount"` + TrendingGroup uint32 `json:"trending_group"` + TrendingMixed float32 `json:"trending_mixed"` + TrendingLocal float32 `json:"trending_local"` + TrendingGlobal float32 `json:"trending_global"` + Name string `json:"name"` } type orderField struct { @@ -72,6 +73,13 @@ func AddTermsField(q *elastic.BoolQuery, arr []string, name string) *elastic.Boo return q.Must(elastic.NewTermsQuery(name, searchVals...)) } +func AddTermField(q *elastic.BoolQuery, value string, name string) *elastic.BoolQuery { + if value != "" { + return q.Must(elastic.NewTermQuery(name, value)) + } + return q +} + func AddIndividualTermFields(q *elastic.BoolQuery, arr []string, name string, invert bool) *elastic.BoolQuery { for _, x := range arr { if invert { @@ -135,49 +143,22 @@ func AddInvertibleField(q *elastic.BoolQuery, field *pb.InvertibleField, name st // 8) return streams referenced by repost and all channel referenced in extra_txos //*/ func (s *Server) Search(ctx context.Context, in *pb.SearchRequest) (*pb.Outputs, error) { - var client *elastic.Client = nil - if s.EsClient == nil { - esUrl := s.Args.EsHost + ":" + s.Args.EsPort - tmpClient, err := elastic.NewClient(elastic.SetURL(esUrl), elastic.SetSniff(false)) - if err != nil { - log.Println(err) - return nil, err - } - client = tmpClient - s.EsClient = client - } else { - client = s.EsClient - } - var from = 0 var pageSize = 10 var orderBy []orderField var searchIndices = []string{} + client := s.EsClient + searchIndices = make([]string, 0, 1) + searchIndices = append(searchIndices, s.Args.EsIndex) q := elastic.NewBoolQuery() + err := s.checkQuery(in) + if err != nil { + return nil, err + } q = s.setupEsQuery(q, in, &pageSize, &from, &orderBy) - if s.Args.Dev && len(in.SearchIndices) == 0 { - // If we're running in dev mode ignore the mainnet claims index - indices, err := client.IndexNames() - if err != nil { - log.Fatalln(err) - } - var numIndices = len(indices) - searchIndices = make([]string, 0, numIndices) - for i := 0; i < numIndices; i++ { - if indices[i] == "claims" { - continue - } - searchIndices = append(searchIndices, indices[i]) - } - } - - if len(in.SearchIndices) > 0 { - searchIndices = in.SearchIndices - } - fsc := elastic.NewFetchSourceContext(true).Exclude("description", "title") search := client.Search(). Index(searchIndices...). @@ -185,14 +166,17 @@ func (s *Server) Search(ctx context.Context, in *pb.SearchRequest) (*pb.Outputs, Query(q). // specify the query From(0).Size(DefaultSearchSize) - for _, x := range orderBy { search = search.Sort(x.Field, x.IsAsc) } searchResult, err := search.Do(ctx) // execute - if err != nil { - log.Println(err) + if err != nil && elastic.IsNotFound(err) { + log.Println("Index returned 404! Check writer. Index: ", searchIndices) + return &pb.Outputs{}, nil + + } else if err != nil { + log.Println("Error executing query: ", err) return nil, err } @@ -200,12 +184,12 @@ func (s *Server) Search(ctx context.Context, in *pb.SearchRequest) (*pb.Outputs, txos, extraTxos, blocked := s.postProcessResults(ctx, client, searchResult, in, pageSize, from, searchIndices) - if in.NoTotals != nil && !in.NoTotals.Value { + if in.NoTotals { return &pb.Outputs{ - Txos: txos, + Txos: txos, ExtraTxos: extraTxos, - Offset: uint32(int64(from) + searchResult.TotalHits()), - Blocked: blocked, + Offset: uint32(int64(from) + searchResult.TotalHits()), + Blocked: blocked, }, nil } @@ -214,11 +198,11 @@ func (s *Server) Search(ctx context.Context, in *pb.SearchRequest) (*pb.Outputs, blockedTotal += b.Count } return &pb.Outputs{ - Txos: txos, - ExtraTxos: extraTxos, - Total: uint32(searchResult.TotalHits()), - Offset: uint32(int64(from) + searchResult.TotalHits()), - Blocked: blocked, + Txos: txos, + ExtraTxos: extraTxos, + Total: uint32(searchResult.TotalHits()), + Offset: uint32(int64(from) + searchResult.TotalHits()), + Blocked: blocked, BlockedTotal: blockedTotal, }, nil } @@ -234,7 +218,6 @@ func (s *Server) normalizeTag(tag string) string { return string(res) } - func (s *Server) cleanTags(tags []string) []string { cleanedTags := make([]string, len(tags)) for i, tag := range tags { @@ -269,18 +252,18 @@ func (s *Server) postProcessResults( //printJsonFullResults(searchResult) records, blockedRecords, blockedMap = removeBlocked(records) - if in.RemoveDuplicates != nil { + if in.RemoveDuplicates { records = removeDuplicates(records) } - if in.LimitClaimsPerChannel != nil && in.LimitClaimsPerChannel.Value > 0 { - records = searchAhead(records, pageSize, int(in.LimitClaimsPerChannel.Value)) + if in.LimitClaimsPerChannel > 0 { + records = searchAhead(records, pageSize, int(in.LimitClaimsPerChannel)) } finalLength := int(math.Min(float64(len(records)), float64(pageSize))) txos = make([]*pb.Output, 0, finalLength) var j = 0 - for i := from; i < from + finalLength && i < len(records) && j < finalLength; i++ { + for i := from; i < from+finalLength && i < len(records) && j < finalLength; i++ { t := records[i] res := t.recordToOutput() txos = append(txos, res) @@ -319,80 +302,91 @@ func (s *Server) postProcessResults( return txos, extraTxos, blocked } +func (s *Server) checkQuery(in *pb.SearchRequest) error { + limit := 2048 + checks := map[string]bool{ + "claim_ids": in.ClaimId != nil && !in.ClaimId.Invert && len(in.ClaimId.Value) > limit, + "not_claim_ids": in.ClaimId != nil && in.ClaimId.Invert && len(in.ClaimId.Value) > limit, + "channel_ids": in.ChannelId != nil && !in.ChannelId.Invert && len(in.ChannelId.Value) > limit, + "not_channel_ids": in.ChannelId != nil && in.ChannelId.Invert && len(in.ChannelId.Value) > limit, + "not_tags": len(in.NotTags) > limit, + "all_tags": len(in.AllTags) > limit, + "any_tags": len(in.AnyTags) > limit, + "any_languages": len(in.AnyLanguages) > limit, + } + for name, failed := range checks { + if failed { + time.Sleep(2) // throttle + return errors.New(fmt.Sprintf("%s cant have more than %d items.", name, limit)) + } + } + return nil +} + func (s *Server) setupEsQuery( q *elastic.BoolQuery, in *pb.SearchRequest, pageSize *int, from *int, orderBy *[]orderField) *elastic.BoolQuery { - claimTypes := map[string]int { - "stream": 1, - "channel": 2, - "repost": 3, + claimTypes := map[string]int{ + "stream": 1, + "channel": 2, + "repost": 3, "collection": 4, } - streamTypes := map[string]int { - "video": 1, - "audio": 2, - "image": 3, + streamTypes := map[string]int{ + "video": 1, + "audio": 2, + "image": 3, "document": 4, - "binary": 5, - "model": 6, + "binary": 5, + "model": 6, } - replacements := map[string]string { - "name": "normalized", - "txid": "tx_id", + replacements := map[string]string{ + "name": "normalized_name", + "txid": "tx_id", "claim_hash": "_id", } - textFields := map[string]bool { - "author": true, - "canonical_url": true, - "channel_id": true, - "claim_name": true, - "description": true, - "claim_id": true, - "media_type": true, - "normalized": true, - "public_key_bytes": true, - "public_key_hash": true, - "short_url": true, - "signature": true, - "signature_digest": true, - "stream_type": true, - "title": true, - "tx_id": true, - "fee_currency": true, + textFields := map[string]bool{ + "author": true, + "canonical_url": true, + "channel_id": true, + "claim_name": true, + "description": true, + "claim_id": true, + "media_type": true, + "normalized_name": true, + "public_key_bytes": true, + "public_key_id": true, + "short_url": true, + "signature": true, + "signature_digest": true, + "stream_type": true, + "title": true, + "tx_id": true, + "fee_currency": true, "reposted_claim_id": true, - "tags": true, + "tags": true, } - if in.IsControlling != nil { - q = q.Must(elastic.NewTermQuery("is_controlling", in.IsControlling.Value)) + if in.IsControlling { + q = q.Must(elastic.NewTermQuery("is_controlling", in.IsControlling)) } - if in.AmountOrder != nil { - in.Limit.Value = 1 - in.OrderBy = []string{"effective_amount"} - in.Offset = &wrappers.Int32Value{Value: in.AmountOrder.Value - 1} + if in.Limit > 0 { + *pageSize = int(in.Limit) } - if in.Limit != nil { - *pageSize = int(in.Limit.Value) + if in.Offset > 0 { + *from = int(in.Offset) } - if in.Offset != nil { - *from = int(in.Offset.Value) - } - - if len(in.Name) > 0 { - normalized := make([]string, len(in.Name)) - for i := 0; i < len(in.Name); i++ { - normalized[i] = util.NormalizeName(in.Name[i]) - } - in.Normalized = normalized + if len(in.ClaimName) > 0 { + in.NormalizedName = util.NormalizeName(in.ClaimName) } if len(in.OrderBy) > 0 { @@ -432,21 +426,6 @@ func (s *Server) setupEsQuery( q = q.Must(elastic.NewTermsQuery("stream_type", searchVals...)) } - - if len(in.XId) > 0 { - searchVals := make([]interface{}, len(in.XId)) - for i := 0; i < len(in.XId); i++ { - util.ReverseBytesInPlace(in.XId[i]) - searchVals[i] = hex.Dump(in.XId[i]) - } - 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 in.ClaimId != nil { searchVals := StrArrToInterface(in.ClaimId.Value) if len(in.ClaimId.Value) == 1 && len(in.ClaimId.Value[0]) < 20 { @@ -466,18 +445,18 @@ func (s *Server) setupEsQuery( if in.PublicKeyId != "" { value := hex.EncodeToString(base58.Decode(in.PublicKeyId)[1:21]) - q = q.Must(elastic.NewTermQuery("public_key_hash.keyword", value)) + q = q.Must(elastic.NewTermQuery("public_key_id.keyword", value)) } - if in.HasChannelSignature != nil && in.HasChannelSignature.Value { + if in.HasChannelSignature { q = q.Must(elastic.NewExistsQuery("signature_digest")) - if in.SignatureValid != nil { - q = q.Must(elastic.NewTermQuery("signature_valid", in.SignatureValid.Value)) + if in.IsSignatureValid != nil { + q = q.Must(elastic.NewTermQuery("is_signature_valid", in.IsSignatureValid.Value)) } - } else if in.SignatureValid != nil { + } else if in.IsSignatureValid != nil { q = q.MinimumNumberShouldMatch(1) q = q.Should(elastic.NewBoolQuery().MustNot(elastic.NewExistsQuery("signature_digest"))) - q = q.Should(elastic.NewTermQuery("signature_valid", in.SignatureValid.Value)) + q = q.Should(elastic.NewTermQuery("is_signature_valid", in.IsSignatureValid.Value)) } if in.HasSource != nil { @@ -492,22 +471,20 @@ func (s *Server) setupEsQuery( q = q.Must(elastic.NewTermQuery("tx_nout", in.TxNout.Value)) } - q = AddTermsField(q, in.PublicKeyHash, "public_key_hash.keyword") - q = AddTermsField(q, in.Author, "author.keyword") - q = AddTermsField(q, in.Title, "title.keyword") - q = AddTermsField(q, in.CanonicalUrl, "canonical_url.keyword") - q = AddTermsField(q, in.ClaimName, "claim_name.keyword") - q = AddTermsField(q, in.Description, "description.keyword") + q = AddTermField(q, in.Author, "author.keyword") + q = AddTermField(q, in.Title, "title.keyword") + q = AddTermField(q, in.CanonicalUrl, "canonical_url.keyword") + q = AddTermField(q, in.ClaimName, "claim_name.keyword") + q = AddTermField(q, in.Description, "description.keyword") q = AddTermsField(q, in.MediaType, "media_type.keyword") - q = AddTermsField(q, in.Normalized, "normalized.keyword") - q = AddTermsField(q, in.PublicKeyBytes, "public_key_bytes.keyword") - q = AddTermsField(q, in.ShortUrl, "short_url.keyword") - q = AddTermsField(q, in.Signature, "signature.keyword") - q = AddTermsField(q, in.SignatureDigest, "signature_digest.keyword") - q = AddTermsField(q, in.TxId, "tx_id.keyword") - q = AddTermsField(q, in.FeeCurrency, "fee_currency.keyword") - q = AddTermsField(q, in.RepostedClaimId, "reposted_claim_id.keyword") - + q = AddTermField(q, in.NormalizedName, "normalized_name.keyword") + q = AddTermField(q, in.PublicKeyBytes, "public_key_bytes.keyword") + q = AddTermField(q, in.ShortUrl, "short_url.keyword") + q = AddTermField(q, in.Signature, "signature.keyword") + q = AddTermField(q, in.SignatureDigest, "signature_digest.keyword") + q = AddTermField(q, in.TxId, "tx_id.keyword") + q = AddTermField(q, in.FeeCurrency, "fee_currency.keyword") + q = AddTermField(q, in.RepostedClaimId, "reposted_claim_id.keyword") q = AddTermsField(q, s.cleanTags(in.AnyTags), "tags.keyword") q = AddIndividualTermFields(q, s.cleanTags(in.AllTags), "tags.keyword", false) @@ -516,8 +493,6 @@ func (s *Server) setupEsQuery( q = AddIndividualTermFields(q, in.AllLanguages, "languages", false) q = AddInvertibleField(q, in.ChannelId, "channel_id.keyword") - q = AddInvertibleField(q, in.ChannelIds, "channel_id.keyword") - q = AddRangeField(q, in.TxPosition, "tx_position") q = AddRangeField(q, in.Amount, "amount") @@ -528,7 +503,7 @@ func (s *Server) setupEsQuery( q = AddRangeField(q, in.ActivationHeight, "activation_height") q = AddRangeField(q, in.ExpirationHeight, "expiration_height") q = AddRangeField(q, in.ReleaseTime, "release_time") - q = AddRangeField(q, in.Reposted, "reposted") + q = AddRangeField(q, in.RepostCount, "repost_count") q = AddRangeField(q, in.FeeAmount, "fee_amount") q = AddRangeField(q, in.Duration, "duration") q = AddRangeField(q, in.CensorType, "censor_type") @@ -568,9 +543,9 @@ func getUniqueChannels(records []*record, client *elastic.Client, ctx context.Co mget = mget.Add(nmget) totalChannels++ } - if r.CensorType != 0 && !channelsSet[r.CensoringChannelHash] { - channelsSet[r.CensoringChannelHash] = true - nmget := elastic.NewMultiGetItem().Id(r.CensoringChannelHash).Index(searchIndex) + if r.CensorType != 0 && !channelsSet[r.CensoringChannelId] { + channelsSet[r.CensoringChannelId] = true + nmget := elastic.NewMultiGetItem().Id(r.CensoringChannelId).Index(searchIndex) mget = mget.Add(nmget) totalChannels++ } @@ -608,13 +583,13 @@ func getUniqueChannels(records []*record, client *elastic.Client, ctx context.Co func getClaimsForReposts(ctx context.Context, client *elastic.Client, records []*record, searchIndices []string) ([]*pb.Output, []*record, map[string]*pb.Output) { var totalReposted = 0 - var mget = client.Mget()//.StoredFields("_id") + var mget = client.Mget() //.StoredFields("_id") /* - var nmget = elastic.NewMultiGetItem() - for _, index := range searchIndices { - nmget = nmget.Index(index) - } - */ + var nmget = elastic.NewMultiGetItem() + for _, index := range searchIndices { + nmget = nmget.Index(index) + } + */ for _, r := range records { for _, searchIndex := range searchIndices { if r.RepostedClaimId != "" { @@ -656,7 +631,7 @@ func getClaimsForReposts(ctx context.Context, client *elastic.Client, records [] } func searchAhead(searchHits []*record, pageSize int, perChannelPerPage int) []*record { - finalHits := make([]*record, 0 , len(searchHits)) + finalHits := make([]*record, 0, len(searchHits)) var channelCounters map[string]int channelCounters = make(map[string]int) nextPageHitsMaybeCheckLater := deque.New() @@ -665,7 +640,7 @@ func searchAhead(searchHits []*record, pageSize int, perChannelPerPage int) []*r searchHitsQ.PushRight(rec) } for !searchHitsQ.Empty() || !nextPageHitsMaybeCheckLater.Empty() { - if len(finalHits) > 0 && len(finalHits) % pageSize == 0 { + if len(finalHits) > 0 && len(finalHits)%pageSize == 0 { channelCounters = make(map[string]int) } else if len(finalHits) != 0 { // means last page was incomplete and we are left with bad replacements @@ -674,7 +649,7 @@ func searchAhead(searchHits []*record, pageSize int, perChannelPerPage int) []*r for i := 0; i < nextPageHitsMaybeCheckLater.Size(); i++ { rec := nextPageHitsMaybeCheckLater.PopLeft().(*record) - if perChannelPerPage > 0 && channelCounters[rec.ChannelId] < perChannelPerPage { + if perChannelPerPage > 0 && channelCounters[rec.ChannelId] < perChannelPerPage { finalHits = append(finalHits, rec) channelCounters[rec.ChannelId] = channelCounters[rec.ChannelId] + 1 } @@ -686,7 +661,7 @@ func searchAhead(searchHits []*record, pageSize int, perChannelPerPage int) []*r } else if channelCounters[hit.ChannelId] < perChannelPerPage { finalHits = append(finalHits, hit) channelCounters[hit.ChannelId] = channelCounters[hit.ChannelId] + 1 - if len(finalHits) % pageSize == 0 { + if len(finalHits)%pageSize == 0 { break } } else { @@ -752,13 +727,12 @@ func removeDuplicates(searchHits []*record) []*record { hitHeight := hit.Height hitId := hit.getHitId() - if knownIds[hitId] == nil { knownIds[hitId] = hit } else { prevHit := knownIds[hitId] if hitHeight < prevHit.Height { - knownIds[hitId] = hit + knownIds[hitId] = hit dropped[prevHit] = true } else { dropped[hit] = true @@ -766,7 +740,7 @@ func removeDuplicates(searchHits []*record) []*record { } } - deduped := make([]*record, len(searchHits) - len(dropped)) + deduped := make([]*record, len(searchHits)-len(dropped)) var i = 0 for _, hit := range searchHits { @@ -785,15 +759,15 @@ func removeBlocked(searchHits []*record) ([]*record, []*record, map[string]*pb.B blockedChannels := make(map[string]*pb.Blocked) for _, r := range searchHits { if r.CensorType != 0 { - if blockedChannels[r.CensoringChannelHash] == nil { + if blockedChannels[r.CensoringChannelId] == nil { blockedObj := &pb.Blocked{ - Count: 1, + Count: 1, Channel: nil, } - blockedChannels[r.CensoringChannelHash] = blockedObj + blockedChannels[r.CensoringChannelId] = blockedObj blockedHits = append(blockedHits, r) } else { - blockedChannels[r.CensoringChannelHash].Count += 1 + blockedChannels[r.CensoringChannelId].Count += 1 } } else { newHits = append(newHits, r) @@ -833,4 +807,4 @@ func printJsonFullResults(searchResult *elastic.SearchResult) { } fmt.Println(string(b)) } -} \ No newline at end of file +} diff --git a/server/server.go b/server/server.go index 7d50181..14f752a 100644 --- a/server/server.go +++ b/server/server.go @@ -2,6 +2,7 @@ package server import ( "log" + "os" "regexp" pb "github.com/lbryio/hub/protobuf/go" @@ -11,7 +12,7 @@ import ( type Server struct { GrpcServer *grpc.Server - Args *Args + Args *Args MultiSpaceRe *regexp.Regexp WeirdCharsRe *regexp.Regexp EsClient *elastic.Client @@ -19,12 +20,13 @@ type Server struct { } type Args struct { - Serve bool - Host string - Port string - EsHost string - EsPort string - Dev bool + Serve bool + Host string + Port string + EsHost string + EsPort string + EsIndex string + Debug bool } /* @@ -79,12 +81,22 @@ func MakeHubServer(args *Args) *Server { log.Fatal(err) } - s := &Server { - GrpcServer: grpcServer, - Args: args, + esUrl := args.EsHost + ":" + args.EsPort + opts := []elastic.ClientOptionFunc{elastic.SetSniff(false), elastic.SetURL(esUrl)} + if args.Debug { + opts = append(opts, elastic.SetTraceLog(log.New(os.Stderr, "[[ELASTIC]]", 0))) + } + client, err := elastic.NewClient(opts...) + if err != nil { + log.Fatal(err) + } + s := &Server{ + GrpcServer: grpcServer, + Args: args, MultiSpaceRe: multiSpaceRe, WeirdCharsRe: weirdCharsRe, + EsClient: client, } return s -} \ No newline at end of file +}