From 29881f9589a61de5355223855fd51f8a4e6d4044 Mon Sep 17 00:00:00 2001 From: Robin Lai Date: Fri, 22 Nov 2019 16:35:56 -0800 Subject: [PATCH 1/5] Add hub protobuf --- info/node.go | 46 -- protos/hub/hub.pb.go | 1047 ++++++++++++++++++++++++++++++++++++++++++ protos/hub/hub.proto | 113 +++++ 3 files changed, 1160 insertions(+), 46 deletions(-) delete mode 100644 info/node.go create mode 100644 protos/hub/hub.pb.go create mode 100644 protos/hub/hub.proto diff --git a/info/node.go b/info/node.go deleted file mode 100644 index 4d30339..0000000 --- a/info/node.go +++ /dev/null @@ -1,46 +0,0 @@ -package info - -import ( - "time" -) - -// We're deprecating this package to switch using protobuf -// TODO: Remove this package after it's fully deprecated. - -type Node struct { - tableName struct{} `pg:"node_metrics,alias:t,discard_unknown_columns"` - - NodeID string `pg:"node_id,notnull" json:"node_id"` - NodeIP string `pg:"node_ip,notnull" json:"node_ip"` - CpuInfo string `pg:"cpu_info" json:"cpu_info"` - BtfsVersion string `pg:"btfs_version" json:"btfs_version"` - OsType string `pg:"os_type" json:"os_type"` - ArchType string `pg:"arch_type" json:"arch_type"` - UpTime uint64 `pg:"up_time,notnull" json:"up_time"` - StorageUsed uint64 `pg:"storage_used" json:"storage_used"` - StorageCap uint64 `pg:"storage_volume_cap" json:"storage_volume_cap"` - MemoryUsed uint64 `pg:"memory_used" json:"memory_used"` - CpuUsed float64 `pg:"cpu_used" json:"cpu_used"` - TimeCreated time.Time `pg:"time_created" json:"time_created"` - Upload uint64 `pg:"upload" json:"upload"` - Download uint64 `pg:"download" json:"download"` - TotalUp uint64 `pg:"total_upload,notnull" json:"total_upload"` - TotalDown uint64 `pg:"total_download,notnull" json:"total_download"` - BlocksUp uint64 `pg:"blocks_up,notnull" json:"blocks_up"` - BlocksDown uint64 `pg:"blocks_down,notnull" json:"blocks_down"` - NumPeers uint64 `pg:"peers_connected,notnull" json:"peers_connected"` - Reputation float64 `pg:"reputation,notnull" json:"reputation"` - StoragePriceDeal uint64 `pg:"storage_price_deal" json:"storage_price_deal"` - BandwidthPriceDeal uint64 `pg:"bandwidth_price_deal" json:"bandwidth_price_deal"` - - NodeStorage -} - -// Host storage publishable information -type NodeStorage struct { - StoragePriceAsk uint64 `pg:"storage_price_ask" json:"storage_price_ask"` - BandwidthPriceAsk uint64 `pg:"bandwidth_price_ask" json:"bandwidth_price_ask"` - StorageTimeMin uint64 `pg:"storage_time_min" json:"storage_time_min"` - BandwidthLimit float64 `pg:"bandwidth_limit" json:"bandwidth_limit"` - CollateralStake uint64 `pg:"collateral_stake" json:"collateral_stake"` -} diff --git a/protos/hub/hub.pb.go b/protos/hub/hub.pb.go new file mode 100644 index 0000000..82ec3dc --- /dev/null +++ b/protos/hub/hub.pb.go @@ -0,0 +1,1047 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: protos/hub/hub.proto + +package hub + +import ( + context "context" + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/gogo/protobuf/types" + proto "github.com/tron-us/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type ResponseCode int32 + +const ( + ResponseCode_SUCCESS ResponseCode = 0 + ResponseCode_SIGNATURE_FORMAT_ERROR ResponseCode = 1 + ResponseCode_COMPUTE_ADDRESS_ERROR ResponseCode = 2 + ResponseCode_OTHER_ERROR ResponseCode = 20 +) + +var ResponseCode_name = map[int32]string{ + 0: "SUCCESS", + 1: "SIGNATURE_FORMAT_ERROR", + 2: "COMPUTE_ADDRESS_ERROR", + 20: "OTHER_ERROR", +} + +var ResponseCode_value = map[string]int32{ + "SUCCESS": 0, + "SIGNATURE_FORMAT_ERROR": 1, + "COMPUTE_ADDRESS_ERROR": 2, + "OTHER_ERROR": 20, +} + +func (x ResponseCode) String() string { + return proto.EnumName(ResponseCode_name, int32(x)) +} + +func (ResponseCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_c704b5990190a69f, []int{0} +} + +type SettingsReq struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` + RespSize int32 `protobuf:"varint,2,opt,name=resp_size,json=respSize,proto3" json:"resp_size,omitempty" pg:"resp_size"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *SettingsReq) Reset() { *m = SettingsReq{} } +func (m *SettingsReq) String() string { return proto.CompactTextString(m) } +func (*SettingsReq) ProtoMessage() {} +func (*SettingsReq) Descriptor() ([]byte, []int) { + return fileDescriptor_c704b5990190a69f, []int{0} +} +func (m *SettingsReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SettingsReq.Unmarshal(m, b) +} +func (m *SettingsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SettingsReq.Marshal(b, m, deterministic) +} +func (m *SettingsReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SettingsReq.Merge(m, src) +} +func (m *SettingsReq) XXX_Size() int { + return xxx_messageInfo_SettingsReq.Size(m) +} +func (m *SettingsReq) XXX_DiscardUnknown() { + xxx_messageInfo_SettingsReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SettingsReq proto.InternalMessageInfo + +func (m *SettingsReq) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *SettingsReq) GetRespSize() int32 { + if m != nil { + return m.RespSize + } + return 0 +} + +type SettingsResp struct { + Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=hub.ResponseCode" json:"code,omitempty" pg:"code"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` + ResponseTime *time.Time `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time,omitempty" pg:"response_time"` + SettingsData *SettingsData `protobuf:"bytes,4,opt,name=settings_data,json=settingsData,proto3" json:"settings_data,omitempty" pg:"settings_data"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *SettingsResp) Reset() { *m = SettingsResp{} } +func (m *SettingsResp) String() string { return proto.CompactTextString(m) } +func (*SettingsResp) ProtoMessage() {} +func (*SettingsResp) Descriptor() ([]byte, []int) { + return fileDescriptor_c704b5990190a69f, []int{1} +} +func (m *SettingsResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SettingsResp.Unmarshal(m, b) +} +func (m *SettingsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SettingsResp.Marshal(b, m, deterministic) +} +func (m *SettingsResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SettingsResp.Merge(m, src) +} +func (m *SettingsResp) XXX_Size() int { + return xxx_messageInfo_SettingsResp.Size(m) +} +func (m *SettingsResp) XXX_DiscardUnknown() { + xxx_messageInfo_SettingsResp.DiscardUnknown(m) +} + +var xxx_messageInfo_SettingsResp proto.InternalMessageInfo + +func (m *SettingsResp) GetCode() ResponseCode { + if m != nil { + return m.Code + } + return ResponseCode_SUCCESS +} + +func (m *SettingsResp) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func (m *SettingsResp) GetResponseTime() *time.Time { + if m != nil { + return m.ResponseTime + } + return nil +} + +func (m *SettingsResp) GetSettingsData() *SettingsData { + if m != nil { + return m.SettingsData + } + return nil +} + +type SettingsData struct { + StoragePriceAsk float64 `protobuf:"fixed64,1,opt,name=storage_price_ask,json=storagePriceAsk,proto3" json:"storage_price_ask,omitempty" pg:"storage_price_ask"` + BandwidthPriceAsk float64 `protobuf:"fixed64,2,opt,name=bandwidth_price_ask,json=bandwidthPriceAsk,proto3" json:"bandwidth_price_ask,omitempty" pg:"bandwidth_price_ask"` + StorageTimeMin float64 `protobuf:"fixed64,3,opt,name=storage_time_min,json=storageTimeMin,proto3" json:"storage_time_min,omitempty" pg:"storage_time_min"` + BandwidthLimit float64 `protobuf:"fixed64,4,opt,name=bandwidth_limit,json=bandwidthLimit,proto3" json:"bandwidth_limit,omitempty" pg:"bandwidth_limit"` + CollateralStake float64 `protobuf:"fixed64,5,opt,name=collateral_stake,json=collateralStake,proto3" json:"collateral_stake,omitempty" pg:"collateral_stake"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *SettingsData) Reset() { *m = SettingsData{} } +func (m *SettingsData) String() string { return proto.CompactTextString(m) } +func (*SettingsData) ProtoMessage() {} +func (*SettingsData) Descriptor() ([]byte, []int) { + return fileDescriptor_c704b5990190a69f, []int{2} +} +func (m *SettingsData) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SettingsData.Unmarshal(m, b) +} +func (m *SettingsData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SettingsData.Marshal(b, m, deterministic) +} +func (m *SettingsData) XXX_Merge(src proto.Message) { + xxx_messageInfo_SettingsData.Merge(m, src) +} +func (m *SettingsData) XXX_Size() int { + return xxx_messageInfo_SettingsData.Size(m) +} +func (m *SettingsData) XXX_DiscardUnknown() { + xxx_messageInfo_SettingsData.DiscardUnknown(m) +} + +var xxx_messageInfo_SettingsData proto.InternalMessageInfo + +func (m *SettingsData) GetStoragePriceAsk() float64 { + if m != nil { + return m.StoragePriceAsk + } + return 0 +} + +func (m *SettingsData) GetBandwidthPriceAsk() float64 { + if m != nil { + return m.BandwidthPriceAsk + } + return 0 +} + +func (m *SettingsData) GetStorageTimeMin() float64 { + if m != nil { + return m.StorageTimeMin + } + return 0 +} + +func (m *SettingsData) GetBandwidthLimit() float64 { + if m != nil { + return m.BandwidthLimit + } + return 0 +} + +func (m *SettingsData) GetCollateralStake() float64 { + if m != nil { + return m.CollateralStake + } + return 0 +} + +type HostsReq struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` + RespSize int32 `protobuf:"varint,2,opt,name=resp_size,json=respSize,proto3" json:"resp_size,omitempty" pg:"resp_size"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *HostsReq) Reset() { *m = HostsReq{} } +func (m *HostsReq) String() string { return proto.CompactTextString(m) } +func (*HostsReq) ProtoMessage() {} +func (*HostsReq) Descriptor() ([]byte, []int) { + return fileDescriptor_c704b5990190a69f, []int{3} +} +func (m *HostsReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HostsReq.Unmarshal(m, b) +} +func (m *HostsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HostsReq.Marshal(b, m, deterministic) +} +func (m *HostsReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_HostsReq.Merge(m, src) +} +func (m *HostsReq) XXX_Size() int { + return xxx_messageInfo_HostsReq.Size(m) +} +func (m *HostsReq) XXX_DiscardUnknown() { + xxx_messageInfo_HostsReq.DiscardUnknown(m) +} + +var xxx_messageInfo_HostsReq proto.InternalMessageInfo + +func (m *HostsReq) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *HostsReq) GetRespSize() int32 { + if m != nil { + return m.RespSize + } + return 0 +} + +type HostsResp struct { + Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=hub.ResponseCode" json:"code,omitempty" pg:"code"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` + Hosts *HostsData `protobuf:"bytes,3,opt,name=hosts,proto3" json:"hosts,omitempty" pg:"hosts"` + RespSize int32 `protobuf:"varint,4,opt,name=resp_size,json=respSize,proto3" json:"resp_size,omitempty" pg:"resp_size"` + Mode string `protobuf:"bytes,5,opt,name=mode,proto3" json:"mode,omitempty" pg:"mode"` + ResponseTime *time.Time `protobuf:"bytes,6,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time,omitempty" pg:"response_time"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *HostsResp) Reset() { *m = HostsResp{} } +func (m *HostsResp) String() string { return proto.CompactTextString(m) } +func (*HostsResp) ProtoMessage() {} +func (*HostsResp) Descriptor() ([]byte, []int) { + return fileDescriptor_c704b5990190a69f, []int{4} +} +func (m *HostsResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HostsResp.Unmarshal(m, b) +} +func (m *HostsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HostsResp.Marshal(b, m, deterministic) +} +func (m *HostsResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_HostsResp.Merge(m, src) +} +func (m *HostsResp) XXX_Size() int { + return xxx_messageInfo_HostsResp.Size(m) +} +func (m *HostsResp) XXX_DiscardUnknown() { + xxx_messageInfo_HostsResp.DiscardUnknown(m) +} + +var xxx_messageInfo_HostsResp proto.InternalMessageInfo + +func (m *HostsResp) GetCode() ResponseCode { + if m != nil { + return m.Code + } + return ResponseCode_SUCCESS +} + +func (m *HostsResp) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func (m *HostsResp) GetHosts() *HostsData { + if m != nil { + return m.Hosts + } + return nil +} + +func (m *HostsResp) GetRespSize() int32 { + if m != nil { + return m.RespSize + } + return 0 +} + +func (m *HostsResp) GetMode() string { + if m != nil { + return m.Mode + } + return "" +} + +func (m *HostsResp) GetResponseTime() *time.Time { + if m != nil { + return m.ResponseTime + } + return nil +} + +type HostsData struct { + Hosts []*Host `protobuf:"bytes,1,rep,name=hosts,proto3" json:"hosts,omitempty" pg:"hosts"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *HostsData) Reset() { *m = HostsData{} } +func (m *HostsData) String() string { return proto.CompactTextString(m) } +func (*HostsData) ProtoMessage() {} +func (*HostsData) Descriptor() ([]byte, []int) { + return fileDescriptor_c704b5990190a69f, []int{5} +} +func (m *HostsData) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HostsData.Unmarshal(m, b) +} +func (m *HostsData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HostsData.Marshal(b, m, deterministic) +} +func (m *HostsData) XXX_Merge(src proto.Message) { + xxx_messageInfo_HostsData.Merge(m, src) +} +func (m *HostsData) XXX_Size() int { + return xxx_messageInfo_HostsData.Size(m) +} +func (m *HostsData) XXX_DiscardUnknown() { + xxx_messageInfo_HostsData.DiscardUnknown(m) +} + +var xxx_messageInfo_HostsData proto.InternalMessageInfo + +func (m *HostsData) GetHosts() []*Host { + if m != nil { + return m.Hosts + } + return nil +} + +type Host struct { + NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` + TimeCreate *time.Time `protobuf:"bytes,2,opt,name=time_create,json=timeCreate,proto3,stdtime" json:"time_create,omitempty" pg:"time_create"` + TimeUpdate *time.Time `protobuf:"bytes,3,opt,name=time_update,json=timeUpdate,proto3,stdtime" json:"time_update,omitempty" pg:"time_update"` + NodeIp string `protobuf:"bytes,4,opt,name=node_ip,json=nodeIp,proto3" json:"node_ip,omitempty" pg:"node_ip"` + Region string `protobuf:"bytes,5,opt,name=region,proto3" json:"region,omitempty" pg:"region"` + BtfsVersion string `protobuf:"bytes,6,opt,name=btfs_version,json=btfsVersion,proto3" json:"btfs_version,omitempty" pg:"btfs_version"` + Score float32 `protobuf:"fixed32,7,opt,name=score,proto3" json:"score,omitempty" pg:"score"` + HeartBeats int64 `protobuf:"varint,8,opt,name=heart_beats,json=heartBeats,proto3" json:"heart_beats,omitempty" pg:"heart_beats"` + Uptime float32 `protobuf:"fixed32,9,opt,name=uptime,proto3" json:"uptime,omitempty" pg:"uptime"` + Age int64 `protobuf:"varint,10,opt,name=age,proto3" json:"age,omitempty" pg:"age"` + Reputation float32 `protobuf:"fixed32,11,opt,name=reputation,proto3" json:"reputation,omitempty" pg:"reputation"` + UploadAvg float32 `protobuf:"fixed32,12,opt,name=upload_avg,json=uploadAvg,proto3" json:"upload_avg,omitempty" pg:"upload_avg"` + UploadVar float32 `protobuf:"fixed32,13,opt,name=upload_var,json=uploadVar,proto3" json:"upload_var,omitempty" pg:"upload_var"` + DownloadAvg float32 `protobuf:"fixed32,14,opt,name=download_avg,json=downloadAvg,proto3" json:"download_avg,omitempty" pg:"download_avg"` + DownloadVar float32 `protobuf:"fixed32,15,opt,name=download_var,json=downloadVar,proto3" json:"download_var,omitempty" pg:"download_var"` + Location *Location `protobuf:"bytes,16,opt,name=location,proto3" json:"location,omitempty" pg:"location"` + StorageInfo *StorageInfo `protobuf:"bytes,17,opt,name=storage_info,json=storageInfo,proto3" json:"storage_info,omitempty" pg:"storage_info"` + BandwidthInfo *BandwidthInfo `protobuf:"bytes,18,opt,name=bandwidth_info,json=bandwidthInfo,proto3" json:"bandwidth_info,omitempty" pg:"bandwidth_info"` + CollateralInfo *CollateralInfo `protobuf:"bytes,19,opt,name=collateral_info,json=collateralInfo,proto3" json:"collateral_info,omitempty" pg:"collateral_info"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *Host) Reset() { *m = Host{} } +func (m *Host) String() string { return proto.CompactTextString(m) } +func (*Host) ProtoMessage() {} +func (*Host) Descriptor() ([]byte, []int) { + return fileDescriptor_c704b5990190a69f, []int{6} +} +func (m *Host) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Host.Unmarshal(m, b) +} +func (m *Host) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Host.Marshal(b, m, deterministic) +} +func (m *Host) XXX_Merge(src proto.Message) { + xxx_messageInfo_Host.Merge(m, src) +} +func (m *Host) XXX_Size() int { + return xxx_messageInfo_Host.Size(m) +} +func (m *Host) XXX_DiscardUnknown() { + xxx_messageInfo_Host.DiscardUnknown(m) +} + +var xxx_messageInfo_Host proto.InternalMessageInfo + +func (m *Host) GetNodeId() string { + if m != nil { + return m.NodeId + } + return "" +} + +func (m *Host) GetTimeCreate() *time.Time { + if m != nil { + return m.TimeCreate + } + return nil +} + +func (m *Host) GetTimeUpdate() *time.Time { + if m != nil { + return m.TimeUpdate + } + return nil +} + +func (m *Host) GetNodeIp() string { + if m != nil { + return m.NodeIp + } + return "" +} + +func (m *Host) GetRegion() string { + if m != nil { + return m.Region + } + return "" +} + +func (m *Host) GetBtfsVersion() string { + if m != nil { + return m.BtfsVersion + } + return "" +} + +func (m *Host) GetScore() float32 { + if m != nil { + return m.Score + } + return 0 +} + +func (m *Host) GetHeartBeats() int64 { + if m != nil { + return m.HeartBeats + } + return 0 +} + +func (m *Host) GetUptime() float32 { + if m != nil { + return m.Uptime + } + return 0 +} + +func (m *Host) GetAge() int64 { + if m != nil { + return m.Age + } + return 0 +} + +func (m *Host) GetReputation() float32 { + if m != nil { + return m.Reputation + } + return 0 +} + +func (m *Host) GetUploadAvg() float32 { + if m != nil { + return m.UploadAvg + } + return 0 +} + +func (m *Host) GetUploadVar() float32 { + if m != nil { + return m.UploadVar + } + return 0 +} + +func (m *Host) GetDownloadAvg() float32 { + if m != nil { + return m.DownloadAvg + } + return 0 +} + +func (m *Host) GetDownloadVar() float32 { + if m != nil { + return m.DownloadVar + } + return 0 +} + +func (m *Host) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *Host) GetStorageInfo() *StorageInfo { + if m != nil { + return m.StorageInfo + } + return nil +} + +func (m *Host) GetBandwidthInfo() *BandwidthInfo { + if m != nil { + return m.BandwidthInfo + } + return nil +} + +func (m *Host) GetCollateralInfo() *CollateralInfo { + if m != nil { + return m.CollateralInfo + } + return nil +} + +type Location struct { + Lat float64 `protobuf:"fixed64,1,opt,name=lat,proto3" json:"lat,omitempty" pg:"lat"` + Lon float64 `protobuf:"fixed64,2,opt,name=lon,proto3" json:"lon,omitempty" pg:"lon"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *Location) Reset() { *m = Location{} } +func (m *Location) String() string { return proto.CompactTextString(m) } +func (*Location) ProtoMessage() {} +func (*Location) Descriptor() ([]byte, []int) { + return fileDescriptor_c704b5990190a69f, []int{7} +} +func (m *Location) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Location.Unmarshal(m, b) +} +func (m *Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Location.Marshal(b, m, deterministic) +} +func (m *Location) XXX_Merge(src proto.Message) { + xxx_messageInfo_Location.Merge(m, src) +} +func (m *Location) XXX_Size() int { + return xxx_messageInfo_Location.Size(m) +} +func (m *Location) XXX_DiscardUnknown() { + xxx_messageInfo_Location.DiscardUnknown(m) +} + +var xxx_messageInfo_Location proto.InternalMessageInfo + +func (m *Location) GetLat() float64 { + if m != nil { + return m.Lat + } + return 0 +} + +func (m *Location) GetLon() float64 { + if m != nil { + return m.Lon + } + return 0 +} + +type StorageInfo struct { + StorageCap float32 `protobuf:"fixed32,1,opt,name=storage_cap,json=storageCap,proto3" json:"storage_cap,omitempty" pg:"storage_cap"` + StorageLeft float32 `protobuf:"fixed32,2,opt,name=storage_left,json=storageLeft,proto3" json:"storage_left,omitempty" pg:"storage_left"` + StorageMinTime int64 `protobuf:"varint,3,opt,name=storage_min_time,json=storageMinTime,proto3" json:"storage_min_time,omitempty" pg:"storage_min_time"` + StorageAskPrice float32 `protobuf:"fixed32,4,opt,name=storage_ask_price,json=storageAskPrice,proto3" json:"storage_ask_price,omitempty" pg:"storage_ask_price"` + StoragePriceEst float32 `protobuf:"fixed32,5,opt,name=storage_price_est,json=storagePriceEst,proto3" json:"storage_price_est,omitempty" pg:"storage_price_est"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *StorageInfo) Reset() { *m = StorageInfo{} } +func (m *StorageInfo) String() string { return proto.CompactTextString(m) } +func (*StorageInfo) ProtoMessage() {} +func (*StorageInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_c704b5990190a69f, []int{8} +} +func (m *StorageInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StorageInfo.Unmarshal(m, b) +} +func (m *StorageInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StorageInfo.Marshal(b, m, deterministic) +} +func (m *StorageInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageInfo.Merge(m, src) +} +func (m *StorageInfo) XXX_Size() int { + return xxx_messageInfo_StorageInfo.Size(m) +} +func (m *StorageInfo) XXX_DiscardUnknown() { + xxx_messageInfo_StorageInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageInfo proto.InternalMessageInfo + +func (m *StorageInfo) GetStorageCap() float32 { + if m != nil { + return m.StorageCap + } + return 0 +} + +func (m *StorageInfo) GetStorageLeft() float32 { + if m != nil { + return m.StorageLeft + } + return 0 +} + +func (m *StorageInfo) GetStorageMinTime() int64 { + if m != nil { + return m.StorageMinTime + } + return 0 +} + +func (m *StorageInfo) GetStorageAskPrice() float32 { + if m != nil { + return m.StorageAskPrice + } + return 0 +} + +func (m *StorageInfo) GetStoragePriceEst() float32 { + if m != nil { + return m.StoragePriceEst + } + return 0 +} + +type BandwidthInfo struct { + BandwidthLimit float32 `protobuf:"fixed32,1,opt,name=bandwidth_limit,json=bandwidthLimit,proto3" json:"bandwidth_limit,omitempty" pg:"bandwidth_limit"` + BandwidthAskPrice float32 `protobuf:"fixed32,2,opt,name=bandwidth_ask_price,json=bandwidthAskPrice,proto3" json:"bandwidth_ask_price,omitempty" pg:"bandwidth_ask_price"` + BandwidthPriceEst float32 `protobuf:"fixed32,3,opt,name=bandwidth_price_est,json=bandwidthPriceEst,proto3" json:"bandwidth_price_est,omitempty" pg:"bandwidth_price_est"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *BandwidthInfo) Reset() { *m = BandwidthInfo{} } +func (m *BandwidthInfo) String() string { return proto.CompactTextString(m) } +func (*BandwidthInfo) ProtoMessage() {} +func (*BandwidthInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_c704b5990190a69f, []int{9} +} +func (m *BandwidthInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BandwidthInfo.Unmarshal(m, b) +} +func (m *BandwidthInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BandwidthInfo.Marshal(b, m, deterministic) +} +func (m *BandwidthInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_BandwidthInfo.Merge(m, src) +} +func (m *BandwidthInfo) XXX_Size() int { + return xxx_messageInfo_BandwidthInfo.Size(m) +} +func (m *BandwidthInfo) XXX_DiscardUnknown() { + xxx_messageInfo_BandwidthInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_BandwidthInfo proto.InternalMessageInfo + +func (m *BandwidthInfo) GetBandwidthLimit() float32 { + if m != nil { + return m.BandwidthLimit + } + return 0 +} + +func (m *BandwidthInfo) GetBandwidthAskPrice() float32 { + if m != nil { + return m.BandwidthAskPrice + } + return 0 +} + +func (m *BandwidthInfo) GetBandwidthPriceEst() float32 { + if m != nil { + return m.BandwidthPriceEst + } + return 0 +} + +type CollateralInfo struct { + CollateralStake float32 `protobuf:"fixed32,1,opt,name=collateral_stake,json=collateralStake,proto3" json:"collateral_stake,omitempty" pg:"collateral_stake"` + CollateralLost float32 `protobuf:"fixed32,2,opt,name=collateral_lost,json=collateralLost,proto3" json:"collateral_lost,omitempty" pg:"collateral_lost"` + CollateralBurn float32 `protobuf:"fixed32,3,opt,name=collateral_burn,json=collateralBurn,proto3" json:"collateral_burn,omitempty" pg:"collateral_burn"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *CollateralInfo) Reset() { *m = CollateralInfo{} } +func (m *CollateralInfo) String() string { return proto.CompactTextString(m) } +func (*CollateralInfo) ProtoMessage() {} +func (*CollateralInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_c704b5990190a69f, []int{10} +} +func (m *CollateralInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CollateralInfo.Unmarshal(m, b) +} +func (m *CollateralInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CollateralInfo.Marshal(b, m, deterministic) +} +func (m *CollateralInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_CollateralInfo.Merge(m, src) +} +func (m *CollateralInfo) XXX_Size() int { + return xxx_messageInfo_CollateralInfo.Size(m) +} +func (m *CollateralInfo) XXX_DiscardUnknown() { + xxx_messageInfo_CollateralInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_CollateralInfo proto.InternalMessageInfo + +func (m *CollateralInfo) GetCollateralStake() float32 { + if m != nil { + return m.CollateralStake + } + return 0 +} + +func (m *CollateralInfo) GetCollateralLost() float32 { + if m != nil { + return m.CollateralLost + } + return 0 +} + +func (m *CollateralInfo) GetCollateralBurn() float32 { + if m != nil { + return m.CollateralBurn + } + return 0 +} + +func init() { + proto.RegisterEnum("hub.ResponseCode", ResponseCode_name, ResponseCode_value) + proto.RegisterType((*SettingsReq)(nil), "hub.SettingsReq") + proto.RegisterType((*SettingsResp)(nil), "hub.SettingsResp") + proto.RegisterType((*SettingsData)(nil), "hub.SettingsData") + proto.RegisterType((*HostsReq)(nil), "hub.HostsReq") + proto.RegisterType((*HostsResp)(nil), "hub.HostsResp") + proto.RegisterType((*HostsData)(nil), "hub.HostsData") + proto.RegisterType((*Host)(nil), "hub.Host") + proto.RegisterType((*Location)(nil), "hub.Location") + proto.RegisterType((*StorageInfo)(nil), "hub.StorageInfo") + proto.RegisterType((*BandwidthInfo)(nil), "hub.BandwidthInfo") + proto.RegisterType((*CollateralInfo)(nil), "hub.CollateralInfo") +} + +func init() { proto.RegisterFile("protos/hub/hub.proto", fileDescriptor_c704b5990190a69f) } + +var fileDescriptor_c704b5990190a69f = []byte{ + // 1078 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x6f, 0x23, 0x45, + 0x10, 0x65, 0xfc, 0x91, 0xd8, 0x35, 0xb6, 0xe3, 0x74, 0xc2, 0x62, 0x82, 0xd8, 0x18, 0x0b, 0x84, + 0x77, 0x05, 0x8e, 0xe4, 0x95, 0x40, 0x20, 0x84, 0x64, 0x3b, 0x26, 0x89, 0x94, 0x90, 0xa8, 0x9d, + 0xec, 0x81, 0xcb, 0xa8, 0xed, 0x69, 0x3b, 0xa3, 0xd8, 0xd3, 0xb3, 0xd3, 0xed, 0xac, 0xb4, 0xff, + 0x01, 0x89, 0x23, 0xbf, 0x8a, 0x0b, 0x07, 0x8e, 0x5c, 0x11, 0xbf, 0x02, 0x55, 0xcd, 0xa7, 0xb3, + 0x39, 0xb0, 0x88, 0x43, 0xa4, 0xae, 0x57, 0xf5, 0x2a, 0xaf, 0xba, 0x7b, 0x5e, 0x1b, 0xf6, 0x83, + 0x50, 0x19, 0xa5, 0x8f, 0x6e,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x17, 0xbb, 0x76, 0xbf, 0x9a, 0x4a, 0x8d, 0x55, 0x76, 0xfe, 0x28, 0x43, 0x09, 0x63, + 0xf6, 0x01, 0x6c, 0xfb, 0xca, 0x95, 0x4e, 0xba, 0xab, 0x5b, 0x18, 0x9e, 0xb9, 0x6c, 0x00, 0x36, + 0x9d, 0xf5, 0x2c, 0x94, 0xc2, 0x44, 0x7b, 0xf1, 0x6f, 0x44, 0x01, 0x92, 0x46, 0xc4, 0x49, 0x5b, + 0xac, 0x03, 0x17, 0x5b, 0x14, 0xdf, 0xa5, 0xc5, 0x0d, 0x71, 0x32, 0x79, 0x01, 0xed, 0x65, 0x22, + 0x2f, 0x60, 0x4f, 0x60, 0x2b, 0x94, 0x0b, 0x4f, 0xf9, 0xf1, 0x5e, 0xc6, 0x11, 0xfb, 0x04, 0x6a, + 0x53, 0x33, 0xd7, 0xce, 0xbd, 0x0c, 0x35, 0x66, 0xb7, 0x28, 0x6b, 0x23, 0xf6, 0x32, 0x82, 0xd8, + 0x3e, 0x94, 0xf5, 0x4c, 0x85, 0xb2, 0xb5, 0xdd, 0xb6, 0xba, 0x05, 0x1e, 0x05, 0xec, 0x10, 0xec, + 0x5b, 0x29, 0x42, 0xe3, 0x4c, 0xa5, 0x30, 0xba, 0x55, 0x69, 0x5b, 0xdd, 0x22, 0x07, 0x82, 0x86, + 0x88, 0xe0, 0x7f, 0x5c, 0x07, 0x74, 0x40, 0x55, 0xe2, 0xc5, 0x11, 0x6b, 0x42, 0x11, 0x2f, 0x0b, + 0x10, 0x01, 0x97, 0xec, 0x29, 0x40, 0x28, 0x83, 0xb5, 0x11, 0x06, 0x15, 0xd8, 0x54, 0x9d, 0x43, + 0xd8, 0xc7, 0x00, 0xeb, 0x60, 0xa9, 0x84, 0xeb, 0x88, 0xfb, 0x45, 0xab, 0x46, 0xf9, 0x6a, 0x84, + 0x0c, 0xee, 0x17, 0xb9, 0xf4, 0xbd, 0x08, 0x5b, 0xf5, 0x7c, 0xfa, 0x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10, 0x1d, 0xf4, 0xfb, 0x50, 0x26, 0x77, 0xc7, 0xef, + 0xf6, 0x44, 0x9a, 0x68, 0x5d, 0xcf, 0x5e, 0x20, 0xa4, 0x35, 0xf2, 0xa1, 0x0e, 0x86, 0x4f, 0xc1, + 0xf6, 0x54, 0x0f, 0x9d, 0x0f, 0x13, 0xc3, 0xca, 0xe9, 0x7a, 0x7a, 0x85, 0x9e, 0x7b, 0x65, 0xfd, + 0x84, 0xbf, 0xcf, 0xa6, 0x5b, 0xe4, 0xc0, 0x2f, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x7b, 0xa0, + 0x1c, 0x4e, 0xc3, 0x09, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// SettingsClient is the client API for Settings service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type SettingsClient interface { + GetSettings(ctx context.Context, in *SettingsReq, opts ...grpc.CallOption) (*SettingsResp, error) +} + +type settingsClient struct { + cc *grpc.ClientConn +} + +func NewSettingsClient(cc *grpc.ClientConn) SettingsClient { + return &settingsClient{cc} +} + +func (c *settingsClient) GetSettings(ctx context.Context, in *SettingsReq, opts ...grpc.CallOption) (*SettingsResp, error) { + out := new(SettingsResp) + err := c.cc.Invoke(ctx, "/hub.Settings/GetSettings", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SettingsServer is the server API for Settings service. +type SettingsServer interface { + GetSettings(context.Context, *SettingsReq) (*SettingsResp, error) +} + +// UnimplementedSettingsServer can be embedded to have forward compatible implementations. +type UnimplementedSettingsServer struct { +} + +func (*UnimplementedSettingsServer) GetSettings(ctx context.Context, req *SettingsReq) (*SettingsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSettings not implemented") +} + +func RegisterSettingsServer(s *grpc.Server, srv SettingsServer) { + s.RegisterService(&_Settings_serviceDesc, srv) +} + +func _Settings_GetSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SettingsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SettingsServer).GetSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hub.Settings/GetSettings", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SettingsServer).GetSettings(ctx, req.(*SettingsReq)) + } + return interceptor(ctx, in, info, handler) +} + +var _Settings_serviceDesc = grpc.ServiceDesc{ + ServiceName: "hub.Settings", + HandlerType: (*SettingsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetSettings", + Handler: _Settings_GetSettings_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "protos/hub/hub.proto", +} + +// HostsClient is the client API for Hosts service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type HostsClient interface { + GetHosts(ctx context.Context, in *HostsReq, opts ...grpc.CallOption) (*HostsResp, error) +} + +type hostsClient struct { + cc *grpc.ClientConn +} + +func NewHostsClient(cc *grpc.ClientConn) HostsClient { + return &hostsClient{cc} +} + +func (c *hostsClient) GetHosts(ctx context.Context, in *HostsReq, opts ...grpc.CallOption) (*HostsResp, error) { + out := new(HostsResp) + err := c.cc.Invoke(ctx, "/hub.Hosts/GetHosts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HostsServer is the server API for Hosts service. +type HostsServer interface { + GetHosts(context.Context, *HostsReq) (*HostsResp, error) +} + +// UnimplementedHostsServer can be embedded to have forward compatible implementations. +type UnimplementedHostsServer struct { +} + +func (*UnimplementedHostsServer) GetHosts(ctx context.Context, req *HostsReq) (*HostsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetHosts not implemented") +} + +func RegisterHostsServer(s *grpc.Server, srv HostsServer) { + s.RegisterService(&_Hosts_serviceDesc, srv) +} + +func _Hosts_GetHosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HostsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostsServer).GetHosts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hub.Hosts/GetHosts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostsServer).GetHosts(ctx, req.(*HostsReq)) + } + return interceptor(ctx, in, info, handler) +} + +var _Hosts_serviceDesc = grpc.ServiceDesc{ + ServiceName: "hub.Hosts", + HandlerType: (*HostsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetHosts", + Handler: _Hosts_GetHosts_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "protos/hub/hub.proto", +} diff --git a/protos/hub/hub.proto b/protos/hub/hub.proto new file mode 100644 index 0000000..2bebffb --- /dev/null +++ b/protos/hub/hub.proto @@ -0,0 +1,113 @@ +syntax = "proto3"; + +package hub; + +// golang option +option go_package = "hub"; +// java options +option java_multiple_files = true; +option java_outer_classname = "HubProto"; +option java_package = "io.btfs.hub"; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; + +service Settings { + rpc GetSettings(SettingsReq) returns (SettingsResp); +} + +service Hosts { + rpc GetHosts(HostsReq) returns (HostsResp); +} + +message SettingsReq { + string id = 1; + int32 resp_size = 2; +} + +enum ResponseCode { + SUCCESS = 0; + SIGNATURE_FORMAT_ERROR = 1; + COMPUTE_ADDRESS_ERROR = 2; + OTHER_ERROR = 20; +} + +message SettingsResp { + ResponseCode code = 1; + string message = 2; + google.protobuf.Timestamp response_time = 3 [(gogoproto.stdtime) = true]; + SettingsData settings_data = 4; +} + +message SettingsData { + double storage_price_ask = 1; + double bandwidth_price_ask = 2; + double storage_time_min = 3; + double bandwidth_limit = 4; + double collateral_stake = 5; +} + +message HostsReq { + string id = 1; + int32 resp_size = 2; +} + +message HostsResp { + ResponseCode code = 1; + string message = 2; + HostsData hosts = 3; + int32 resp_size = 4; + string mode = 5; + google.protobuf.Timestamp response_time = 6 [(gogoproto.stdtime) = true]; +} + +message HostsData { + repeated Host hosts = 1; +} + +message Host { + string node_id = 1; + google.protobuf.Timestamp time_create = 2 [(gogoproto.stdtime) = true]; + google.protobuf.Timestamp time_update = 3 [(gogoproto.stdtime) = true]; + string node_ip = 4; + string region = 5; + string btfs_version = 6; + float score = 7; + int64 heart_beats = 8; + float uptime = 9; + int64 age = 10; + float reputation = 11; + float upload_avg = 12; + float upload_var = 13; + float download_avg = 14; + float download_var = 15; + Location location = 16; + StorageInfo storage_info = 17; + BandwidthInfo bandwidth_info = 18; + CollateralInfo collateral_info = 19; +} + +message Location { + double lat = 1; + double lon = 2; +} + +message StorageInfo { + float storage_cap = 1; + float storage_left = 2; + int64 storage_min_time = 3; + float storage_ask_price = 4; + float storage_price_est = 5; +} + +message BandwidthInfo { + float bandwidth_limit = 1; + float bandwidth_ask_price = 2; + float bandwidth_price_est = 3; +} + +message CollateralInfo { + float collateral_stake = 1; + float collateral_lost = 2; + float collateral_burn = 3; +} From 31b67a41f2ee0285d02be1432174d5cf8477e8f0 Mon Sep 17 00:00:00 2001 From: Robin Lai Date: Fri, 22 Nov 2019 16:47:10 -0800 Subject: [PATCH 2/5] revert info --- info/node.go | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 info/node.go diff --git a/info/node.go b/info/node.go new file mode 100644 index 0000000..4d30339 --- /dev/null +++ b/info/node.go @@ -0,0 +1,46 @@ +package info + +import ( + "time" +) + +// We're deprecating this package to switch using protobuf +// TODO: Remove this package after it's fully deprecated. + +type Node struct { + tableName struct{} `pg:"node_metrics,alias:t,discard_unknown_columns"` + + NodeID string `pg:"node_id,notnull" json:"node_id"` + NodeIP string `pg:"node_ip,notnull" json:"node_ip"` + CpuInfo string `pg:"cpu_info" json:"cpu_info"` + BtfsVersion string `pg:"btfs_version" json:"btfs_version"` + OsType string `pg:"os_type" json:"os_type"` + ArchType string `pg:"arch_type" json:"arch_type"` + UpTime uint64 `pg:"up_time,notnull" json:"up_time"` + StorageUsed uint64 `pg:"storage_used" json:"storage_used"` + StorageCap uint64 `pg:"storage_volume_cap" json:"storage_volume_cap"` + MemoryUsed uint64 `pg:"memory_used" json:"memory_used"` + CpuUsed float64 `pg:"cpu_used" json:"cpu_used"` + TimeCreated time.Time `pg:"time_created" json:"time_created"` + Upload uint64 `pg:"upload" json:"upload"` + Download uint64 `pg:"download" json:"download"` + TotalUp uint64 `pg:"total_upload,notnull" json:"total_upload"` + TotalDown uint64 `pg:"total_download,notnull" json:"total_download"` + BlocksUp uint64 `pg:"blocks_up,notnull" json:"blocks_up"` + BlocksDown uint64 `pg:"blocks_down,notnull" json:"blocks_down"` + NumPeers uint64 `pg:"peers_connected,notnull" json:"peers_connected"` + Reputation float64 `pg:"reputation,notnull" json:"reputation"` + StoragePriceDeal uint64 `pg:"storage_price_deal" json:"storage_price_deal"` + BandwidthPriceDeal uint64 `pg:"bandwidth_price_deal" json:"bandwidth_price_deal"` + + NodeStorage +} + +// Host storage publishable information +type NodeStorage struct { + StoragePriceAsk uint64 `pg:"storage_price_ask" json:"storage_price_ask"` + BandwidthPriceAsk uint64 `pg:"bandwidth_price_ask" json:"bandwidth_price_ask"` + StorageTimeMin uint64 `pg:"storage_time_min" json:"storage_time_min"` + BandwidthLimit float64 `pg:"bandwidth_limit" json:"bandwidth_limit"` + CollateralStake uint64 `pg:"collateral_stake" json:"collateral_stake"` +} From 7c30ce93867cc0f33b9079e36272341ee61ff56a Mon Sep 17 00:00:00 2001 From: Robin Lai Date: Fri, 22 Nov 2019 16:47:26 -0800 Subject: [PATCH 3/5] recompile hub.proto --- protos/hub/hub.pb.go | 3149 ++++++++++++++++++++++++++++++++++++++++-- protos/hub/hub.proto | 7 + 2 files changed, 3054 insertions(+), 102 deletions(-) diff --git a/protos/hub/hub.pb.go b/protos/hub/hub.pb.go index 82ec3dc..f6639a6 100644 --- a/protos/hub/hub.pb.go +++ b/protos/hub/hub.pb.go @@ -5,19 +5,25 @@ package hub import ( context "context" + encoding_binary "encoding/binary" fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" _ "github.com/gogo/protobuf/types" + golang_proto "github.com/golang/protobuf/proto" proto "github.com/tron-us/protobuf/proto" + github_com_tron_us_protobuf_types "github.com/tron-us/protobuf/types" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" math "math" + math_bits "math/bits" time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen @@ -74,16 +80,25 @@ func (*SettingsReq) Descriptor() ([]byte, []int) { return fileDescriptor_c704b5990190a69f, []int{0} } func (m *SettingsReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SettingsReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *SettingsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SettingsReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_SettingsReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *SettingsReq) XXX_Merge(src proto.Message) { xxx_messageInfo_SettingsReq.Merge(m, src) } func (m *SettingsReq) XXX_Size() int { - return xxx_messageInfo_SettingsReq.Size(m) + return m.Size() } func (m *SettingsReq) XXX_DiscardUnknown() { xxx_messageInfo_SettingsReq.DiscardUnknown(m) @@ -105,6 +120,10 @@ func (m *SettingsReq) GetRespSize() int32 { return 0 } +func (*SettingsReq) XXX_MessageName() string { + return "hub.SettingsReq" +} + type SettingsResp struct { Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=hub.ResponseCode" json:"code,omitempty" pg:"code"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` @@ -122,16 +141,25 @@ func (*SettingsResp) Descriptor() ([]byte, []int) { return fileDescriptor_c704b5990190a69f, []int{1} } func (m *SettingsResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SettingsResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *SettingsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SettingsResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_SettingsResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *SettingsResp) XXX_Merge(src proto.Message) { xxx_messageInfo_SettingsResp.Merge(m, src) } func (m *SettingsResp) XXX_Size() int { - return xxx_messageInfo_SettingsResp.Size(m) + return m.Size() } func (m *SettingsResp) XXX_DiscardUnknown() { xxx_messageInfo_SettingsResp.DiscardUnknown(m) @@ -167,6 +195,10 @@ func (m *SettingsResp) GetSettingsData() *SettingsData { return nil } +func (*SettingsResp) XXX_MessageName() string { + return "hub.SettingsResp" +} + type SettingsData struct { StoragePriceAsk float64 `protobuf:"fixed64,1,opt,name=storage_price_ask,json=storagePriceAsk,proto3" json:"storage_price_ask,omitempty" pg:"storage_price_ask"` BandwidthPriceAsk float64 `protobuf:"fixed64,2,opt,name=bandwidth_price_ask,json=bandwidthPriceAsk,proto3" json:"bandwidth_price_ask,omitempty" pg:"bandwidth_price_ask"` @@ -185,16 +217,25 @@ func (*SettingsData) Descriptor() ([]byte, []int) { return fileDescriptor_c704b5990190a69f, []int{2} } func (m *SettingsData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SettingsData.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *SettingsData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SettingsData.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_SettingsData.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *SettingsData) XXX_Merge(src proto.Message) { xxx_messageInfo_SettingsData.Merge(m, src) } func (m *SettingsData) XXX_Size() int { - return xxx_messageInfo_SettingsData.Size(m) + return m.Size() } func (m *SettingsData) XXX_DiscardUnknown() { xxx_messageInfo_SettingsData.DiscardUnknown(m) @@ -237,6 +278,10 @@ func (m *SettingsData) GetCollateralStake() float64 { return 0 } +func (*SettingsData) XXX_MessageName() string { + return "hub.SettingsData" +} + type HostsReq struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" pg:"id"` RespSize int32 `protobuf:"varint,2,opt,name=resp_size,json=respSize,proto3" json:"resp_size,omitempty" pg:"resp_size"` @@ -252,16 +297,25 @@ func (*HostsReq) Descriptor() ([]byte, []int) { return fileDescriptor_c704b5990190a69f, []int{3} } func (m *HostsReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HostsReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *HostsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HostsReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_HostsReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *HostsReq) XXX_Merge(src proto.Message) { xxx_messageInfo_HostsReq.Merge(m, src) } func (m *HostsReq) XXX_Size() int { - return xxx_messageInfo_HostsReq.Size(m) + return m.Size() } func (m *HostsReq) XXX_DiscardUnknown() { xxx_messageInfo_HostsReq.DiscardUnknown(m) @@ -283,6 +337,10 @@ func (m *HostsReq) GetRespSize() int32 { return 0 } +func (*HostsReq) XXX_MessageName() string { + return "hub.HostsReq" +} + type HostsResp struct { Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=hub.ResponseCode" json:"code,omitempty" pg:"code"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` @@ -302,16 +360,25 @@ func (*HostsResp) Descriptor() ([]byte, []int) { return fileDescriptor_c704b5990190a69f, []int{4} } func (m *HostsResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HostsResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *HostsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HostsResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_HostsResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *HostsResp) XXX_Merge(src proto.Message) { xxx_messageInfo_HostsResp.Merge(m, src) } func (m *HostsResp) XXX_Size() int { - return xxx_messageInfo_HostsResp.Size(m) + return m.Size() } func (m *HostsResp) XXX_DiscardUnknown() { xxx_messageInfo_HostsResp.DiscardUnknown(m) @@ -361,6 +428,10 @@ func (m *HostsResp) GetResponseTime() *time.Time { return nil } +func (*HostsResp) XXX_MessageName() string { + return "hub.HostsResp" +} + type HostsData struct { Hosts []*Host `protobuf:"bytes,1,rep,name=hosts,proto3" json:"hosts,omitempty" pg:"hosts"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` @@ -375,16 +446,25 @@ func (*HostsData) Descriptor() ([]byte, []int) { return fileDescriptor_c704b5990190a69f, []int{5} } func (m *HostsData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HostsData.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *HostsData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HostsData.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_HostsData.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *HostsData) XXX_Merge(src proto.Message) { xxx_messageInfo_HostsData.Merge(m, src) } func (m *HostsData) XXX_Size() int { - return xxx_messageInfo_HostsData.Size(m) + return m.Size() } func (m *HostsData) XXX_DiscardUnknown() { xxx_messageInfo_HostsData.DiscardUnknown(m) @@ -399,6 +479,10 @@ func (m *HostsData) GetHosts() []*Host { return nil } +func (*HostsData) XXX_MessageName() string { + return "hub.HostsData" +} + type Host struct { NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` TimeCreate *time.Time `protobuf:"bytes,2,opt,name=time_create,json=timeCreate,proto3,stdtime" json:"time_create,omitempty" pg:"time_create"` @@ -431,16 +515,25 @@ func (*Host) Descriptor() ([]byte, []int) { return fileDescriptor_c704b5990190a69f, []int{6} } func (m *Host) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Host.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Host) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Host.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Host.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *Host) XXX_Merge(src proto.Message) { xxx_messageInfo_Host.Merge(m, src) } func (m *Host) XXX_Size() int { - return xxx_messageInfo_Host.Size(m) + return m.Size() } func (m *Host) XXX_DiscardUnknown() { xxx_messageInfo_Host.DiscardUnknown(m) @@ -581,6 +674,10 @@ func (m *Host) GetCollateralInfo() *CollateralInfo { return nil } +func (*Host) XXX_MessageName() string { + return "hub.Host" +} + type Location struct { Lat float64 `protobuf:"fixed64,1,opt,name=lat,proto3" json:"lat,omitempty" pg:"lat"` Lon float64 `protobuf:"fixed64,2,opt,name=lon,proto3" json:"lon,omitempty" pg:"lon"` @@ -596,16 +693,25 @@ func (*Location) Descriptor() ([]byte, []int) { return fileDescriptor_c704b5990190a69f, []int{7} } func (m *Location) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Location.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Location.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Location.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *Location) XXX_Merge(src proto.Message) { xxx_messageInfo_Location.Merge(m, src) } func (m *Location) XXX_Size() int { - return xxx_messageInfo_Location.Size(m) + return m.Size() } func (m *Location) XXX_DiscardUnknown() { xxx_messageInfo_Location.DiscardUnknown(m) @@ -627,6 +733,10 @@ func (m *Location) GetLon() float64 { return 0 } +func (*Location) XXX_MessageName() string { + return "hub.Location" +} + type StorageInfo struct { StorageCap float32 `protobuf:"fixed32,1,opt,name=storage_cap,json=storageCap,proto3" json:"storage_cap,omitempty" pg:"storage_cap"` StorageLeft float32 `protobuf:"fixed32,2,opt,name=storage_left,json=storageLeft,proto3" json:"storage_left,omitempty" pg:"storage_left"` @@ -645,16 +755,25 @@ func (*StorageInfo) Descriptor() ([]byte, []int) { return fileDescriptor_c704b5990190a69f, []int{8} } func (m *StorageInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StorageInfo.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *StorageInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StorageInfo.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_StorageInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *StorageInfo) XXX_Merge(src proto.Message) { xxx_messageInfo_StorageInfo.Merge(m, src) } func (m *StorageInfo) XXX_Size() int { - return xxx_messageInfo_StorageInfo.Size(m) + return m.Size() } func (m *StorageInfo) XXX_DiscardUnknown() { xxx_messageInfo_StorageInfo.DiscardUnknown(m) @@ -697,6 +816,10 @@ func (m *StorageInfo) GetStoragePriceEst() float32 { return 0 } +func (*StorageInfo) XXX_MessageName() string { + return "hub.StorageInfo" +} + type BandwidthInfo struct { BandwidthLimit float32 `protobuf:"fixed32,1,opt,name=bandwidth_limit,json=bandwidthLimit,proto3" json:"bandwidth_limit,omitempty" pg:"bandwidth_limit"` BandwidthAskPrice float32 `protobuf:"fixed32,2,opt,name=bandwidth_ask_price,json=bandwidthAskPrice,proto3" json:"bandwidth_ask_price,omitempty" pg:"bandwidth_ask_price"` @@ -713,16 +836,25 @@ func (*BandwidthInfo) Descriptor() ([]byte, []int) { return fileDescriptor_c704b5990190a69f, []int{9} } func (m *BandwidthInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BandwidthInfo.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *BandwidthInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BandwidthInfo.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_BandwidthInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *BandwidthInfo) XXX_Merge(src proto.Message) { xxx_messageInfo_BandwidthInfo.Merge(m, src) } func (m *BandwidthInfo) XXX_Size() int { - return xxx_messageInfo_BandwidthInfo.Size(m) + return m.Size() } func (m *BandwidthInfo) XXX_DiscardUnknown() { xxx_messageInfo_BandwidthInfo.DiscardUnknown(m) @@ -751,6 +883,10 @@ func (m *BandwidthInfo) GetBandwidthPriceEst() float32 { return 0 } +func (*BandwidthInfo) XXX_MessageName() string { + return "hub.BandwidthInfo" +} + type CollateralInfo struct { CollateralStake float32 `protobuf:"fixed32,1,opt,name=collateral_stake,json=collateralStake,proto3" json:"collateral_stake,omitempty" pg:"collateral_stake"` CollateralLost float32 `protobuf:"fixed32,2,opt,name=collateral_lost,json=collateralLost,proto3" json:"collateral_lost,omitempty" pg:"collateral_lost"` @@ -767,16 +903,25 @@ func (*CollateralInfo) Descriptor() ([]byte, []int) { return fileDescriptor_c704b5990190a69f, []int{10} } func (m *CollateralInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CollateralInfo.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *CollateralInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CollateralInfo.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_CollateralInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *CollateralInfo) XXX_Merge(src proto.Message) { xxx_messageInfo_CollateralInfo.Merge(m, src) } func (m *CollateralInfo) XXX_Size() int { - return xxx_messageInfo_CollateralInfo.Size(m) + return m.Size() } func (m *CollateralInfo) XXX_DiscardUnknown() { xxx_messageInfo_CollateralInfo.DiscardUnknown(m) @@ -805,93 +950,111 @@ func (m *CollateralInfo) GetCollateralBurn() float32 { return 0 } +func (*CollateralInfo) XXX_MessageName() string { + return "hub.CollateralInfo" +} func init() { proto.RegisterEnum("hub.ResponseCode", ResponseCode_name, ResponseCode_value) + golang_proto.RegisterEnum("hub.ResponseCode", ResponseCode_name, ResponseCode_value) proto.RegisterType((*SettingsReq)(nil), "hub.SettingsReq") + golang_proto.RegisterType((*SettingsReq)(nil), "hub.SettingsReq") proto.RegisterType((*SettingsResp)(nil), "hub.SettingsResp") + golang_proto.RegisterType((*SettingsResp)(nil), "hub.SettingsResp") proto.RegisterType((*SettingsData)(nil), "hub.SettingsData") + golang_proto.RegisterType((*SettingsData)(nil), "hub.SettingsData") proto.RegisterType((*HostsReq)(nil), "hub.HostsReq") + golang_proto.RegisterType((*HostsReq)(nil), "hub.HostsReq") proto.RegisterType((*HostsResp)(nil), "hub.HostsResp") + golang_proto.RegisterType((*HostsResp)(nil), "hub.HostsResp") proto.RegisterType((*HostsData)(nil), "hub.HostsData") + golang_proto.RegisterType((*HostsData)(nil), "hub.HostsData") proto.RegisterType((*Host)(nil), "hub.Host") + golang_proto.RegisterType((*Host)(nil), "hub.Host") proto.RegisterType((*Location)(nil), "hub.Location") + golang_proto.RegisterType((*Location)(nil), "hub.Location") proto.RegisterType((*StorageInfo)(nil), "hub.StorageInfo") + golang_proto.RegisterType((*StorageInfo)(nil), "hub.StorageInfo") proto.RegisterType((*BandwidthInfo)(nil), "hub.BandwidthInfo") + golang_proto.RegisterType((*BandwidthInfo)(nil), "hub.BandwidthInfo") proto.RegisterType((*CollateralInfo)(nil), "hub.CollateralInfo") + golang_proto.RegisterType((*CollateralInfo)(nil), "hub.CollateralInfo") } func init() { proto.RegisterFile("protos/hub/hub.proto", fileDescriptor_c704b5990190a69f) } +func init() { golang_proto.RegisterFile("protos/hub/hub.proto", fileDescriptor_c704b5990190a69f) } var fileDescriptor_c704b5990190a69f = []byte{ - // 1078 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x6f, 0x23, 0x45, - 0x10, 0x65, 0xfc, 0x91, 0xd8, 0x35, 0xb6, 0xe3, 0x74, 0xc2, 0x62, 0x82, 0xd8, 0x18, 0x0b, 0x84, - 0x77, 0x05, 0x8e, 0xe4, 0x95, 0x40, 0x20, 0x84, 0x64, 0x3b, 0x26, 0x89, 0x94, 0x90, 0xa8, 0x9d, - 0xec, 0x81, 0xcb, 0xa8, 0xed, 0x69, 0x3b, 0xa3, 0xd8, 0xd3, 0xb3, 0xd3, 0xed, 0xac, 0xb4, 0xff, - 0x01, 0x89, 0x23, 0xbf, 0x8a, 0x0b, 0x07, 0x8e, 0x5c, 0x11, 0xbf, 0x02, 0x55, 0xcd, 0xa7, 0xb3, - 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 0xce, 0xb4, - 0x7e, 0xfb, 0x22, 0x6d, 0xfd, 0x97, 0x8b, 0xd4, 0xf9, 0x22, 0x9e, 0x95, 0x2e, 0xc3, 0x61, 0x22, - 0xd5, 0x6a, 0x17, 0xbb, 0x76, 0xbf, 0x9a, 0x4a, 0x8d, 0x55, 0x76, 0xfe, 0x28, 0x43, 0x09, 0x63, - 0xf6, 0x01, 0x6c, 0xfb, 0xca, 0x95, 0x4e, 0xba, 0xab, 0x5b, 0x18, 0x9e, 0xb9, 0x6c, 0x00, 0x36, - 0x9d, 0xf5, 0x2c, 0x94, 0xc2, 0x44, 0x7b, 0xf1, 0x6f, 0x44, 0x01, 0x92, 0x46, 0xc4, 0x49, 0x5b, - 0xac, 0x03, 0x17, 0x5b, 0x14, 0xdf, 0xa5, 0xc5, 0x0d, 0x71, 0x32, 0x79, 0x01, 0xed, 0x65, 0x22, - 0x2f, 0x60, 0x4f, 0x60, 0x2b, 0x94, 0x0b, 0x4f, 0xf9, 0xf1, 0x5e, 0xc6, 0x11, 0xfb, 0x04, 0x6a, - 0x53, 0x33, 0xd7, 0xce, 0xbd, 0x0c, 0x35, 0x66, 0xb7, 0x28, 0x6b, 0x23, 0xf6, 0x32, 0x82, 0xd8, - 0x3e, 0x94, 0xf5, 0x4c, 0x85, 0xb2, 0xb5, 0xdd, 0xb6, 0xba, 0x05, 0x1e, 0x05, 0xec, 0x10, 0xec, - 0x5b, 0x29, 0x42, 0xe3, 0x4c, 0xa5, 0x30, 0xba, 0x55, 0x69, 0x5b, 0xdd, 0x22, 0x07, 0x82, 0x86, - 0x88, 0xe0, 0x7f, 0x5c, 0x07, 0x74, 0x40, 0x55, 0xe2, 0xc5, 0x11, 0x6b, 0x42, 0x11, 0x2f, 0x0b, - 0x10, 0x01, 0x97, 0xec, 0x29, 0x40, 0x28, 0x83, 0xb5, 0x11, 0x06, 0x15, 0xd8, 0x54, 0x9d, 0x43, - 0xd8, 0xc7, 0x00, 0xeb, 0x60, 0xa9, 0x84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0x1e, 0x2a, 0xc9, 0x6b, 0xcd, 0xfa, 0x60, 0x9f, 0x48, 0x93, 0x86, 0xcd, 0x8d, - 0xa7, 0x9e, 0xcb, 0x57, 0x07, 0xbb, 0x0f, 0x10, 0x1d, 0xf4, 0xfb, 0x50, 0x26, 0x77, 0xc7, 0xef, - 0xf6, 0x44, 0x9a, 0x68, 0x5d, 0xcf, 0x5e, 0x20, 0xa4, 0x35, 0xf2, 0xa1, 0x0e, 0x86, 0x4f, 0xc1, - 0xf6, 0x54, 0x0f, 0x9d, 0x0f, 0x13, 0xc3, 0xca, 0xe9, 0x7a, 0x7a, 0x85, 0x9e, 0x7b, 0x65, 0xfd, - 0x84, 0xbf, 0xcf, 0xa6, 0x5b, 0xe4, 0xc0, 0x2f, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x7b, 0xa0, - 0x1c, 0x4e, 0xc3, 0x09, 0x00, 0x00, + // 1111 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x6f, 0x23, 0xc5, + 0x13, 0xfd, 0xb5, 0xff, 0x24, 0x76, 0x8d, 0xed, 0x38, 0xbd, 0xfb, 0x5b, 0x4c, 0x10, 0x8e, 0xb1, + 0x40, 0x78, 0x57, 0xe0, 0x48, 0x5e, 0x69, 0x11, 0x08, 0x21, 0xd9, 0x8e, 0x49, 0x22, 0x25, 0x24, + 0x6a, 0x27, 0x7b, 0xe0, 0x32, 0x6a, 0x7b, 0xda, 0xce, 0x28, 0xf6, 0xf4, 0xec, 0x74, 0x3b, 0x2b, + 0xed, 0x77, 0x40, 0xe2, 0xb8, 0x1f, 0x87, 0xe3, 0x9e, 0x10, 0x12, 0x07, 0x8e, 0xa0, 0xe4, 0x82, + 0xf8, 0x14, 0xa8, 0x6b, 0xfe, 0x3a, 0x9b, 0x03, 0x8b, 0x38, 0x44, 0xea, 0x7a, 0x55, 0xaf, 0x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b, 0xdf, 0x40, 0x29, 0x7e, + 0xad, 0x69, 0x0f, 0xac, 0x03, 0xa1, 0x93, 0xb0, 0xbe, 0xf6, 0xd4, 0x33, 0xf1, 0x62, 0x67, 0xfb, + 0x0e, 0xa2, 0xfc, 0x5e, 0x0f, 0x8a, 0xe8, 0xee, 0xe6, 0xbb, 0x3d, 0x10, 0x3a, 0x5c, 0x57, 0xd3, + 0x17, 0xc8, 0xd0, 0x6a, 0xd9, 0x50, 0xf9, 0x83, 0x67, 0x6f, 0x6e, 0x9a, 0xe4, 0x97, 0x9b, 0x26, + 0xf9, 0xe3, 0xa6, 0x49, 0x5e, 0xdf, 0x36, 0xc9, 0x4f, 0xb7, 0x4d, 0xf2, 0xe6, 0xb6, 0x49, 0xc0, + 0x72, 0x65, 0xd7, 0x38, 0xa2, 0x21, 0x0c, 0x4a, 0x87, 0xab, 0xc9, 0x99, 0xf1, 0xe2, 0x33, 0xf2, + 0xbd, 0xf9, 0xdd, 0x36, 0xd9, 0x40, 0x67, 0x7e, 0xfa, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, + 0x85, 0xc9, 0xf4, 0xdb, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1045,3 +1208,2785 @@ var _Hosts_serviceDesc = grpc.ServiceDesc{ Streams: []grpc.StreamDesc{}, Metadata: "protos/hub/hub.proto", } + +func (m *SettingsReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SettingsReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SettingsReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.RespSize != 0 { + i = encodeVarintHub(dAtA, i, uint64(m.RespSize)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintHub(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SettingsResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SettingsResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SettingsResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.SettingsData != nil { + { + size, err := m.SettingsData.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintHub(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.ResponseTime != nil { + n2, err2 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(*m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(*m.ResponseTime):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintHub(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x1a + } + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintHub(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintHub(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SettingsData) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SettingsData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SettingsData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.CollateralStake != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.CollateralStake)))) + i-- + dAtA[i] = 0x29 + } + if m.BandwidthLimit != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.BandwidthLimit)))) + i-- + dAtA[i] = 0x21 + } + if m.StorageTimeMin != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.StorageTimeMin)))) + i-- + dAtA[i] = 0x19 + } + if m.BandwidthPriceAsk != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.BandwidthPriceAsk)))) + i-- + dAtA[i] = 0x11 + } + if m.StoragePriceAsk != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.StoragePriceAsk)))) + i-- + dAtA[i] = 0x9 + } + return len(dAtA) - i, nil +} + +func (m *HostsReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HostsReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HostsReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.RespSize != 0 { + i = encodeVarintHub(dAtA, i, uint64(m.RespSize)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintHub(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *HostsResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HostsResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HostsResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.ResponseTime != nil { + n3, err3 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(*m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(*m.ResponseTime):]) + if err3 != nil { + return 0, err3 + } + i -= n3 + i = encodeVarintHub(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0x32 + } + if len(m.Mode) > 0 { + i -= len(m.Mode) + copy(dAtA[i:], m.Mode) + i = encodeVarintHub(dAtA, i, uint64(len(m.Mode))) + i-- + dAtA[i] = 0x2a + } + if m.RespSize != 0 { + i = encodeVarintHub(dAtA, i, uint64(m.RespSize)) + i-- + dAtA[i] = 0x20 + } + if m.Hosts != nil { + { + size, err := m.Hosts.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintHub(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintHub(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintHub(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *HostsData) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HostsData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HostsData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Hosts) > 0 { + for iNdEx := len(m.Hosts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Hosts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintHub(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Host) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Host) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Host) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.CollateralInfo != nil { + { + size, err := m.CollateralInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintHub(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x9a + } + if m.BandwidthInfo != nil { + { + size, err := m.BandwidthInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintHub(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x92 + } + if m.StorageInfo != nil { + { + size, err := m.StorageInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintHub(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + if m.Location != nil { + { + size, err := m.Location.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintHub(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + if m.DownloadVar != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadVar)))) + i-- + dAtA[i] = 0x7d + } + if m.DownloadAvg != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.DownloadAvg)))) + i-- + dAtA[i] = 0x75 + } + if m.UploadVar != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadVar)))) + i-- + dAtA[i] = 0x6d + } + if m.UploadAvg != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.UploadAvg)))) + i-- + dAtA[i] = 0x65 + } + if m.Reputation != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Reputation)))) + i-- + dAtA[i] = 0x5d + } + if m.Age != 0 { + i = encodeVarintHub(dAtA, i, uint64(m.Age)) + i-- + dAtA[i] = 0x50 + } + if m.Uptime != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Uptime)))) + i-- + dAtA[i] = 0x4d + } + if m.HeartBeats != 0 { + i = encodeVarintHub(dAtA, i, uint64(m.HeartBeats)) + i-- + dAtA[i] = 0x40 + } + if m.Score != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Score)))) + i-- + dAtA[i] = 0x3d + } + if len(m.BtfsVersion) > 0 { + i -= len(m.BtfsVersion) + copy(dAtA[i:], m.BtfsVersion) + i = encodeVarintHub(dAtA, i, uint64(len(m.BtfsVersion))) + i-- + dAtA[i] = 0x32 + } + if len(m.Region) > 0 { + i -= len(m.Region) + copy(dAtA[i:], m.Region) + i = encodeVarintHub(dAtA, i, uint64(len(m.Region))) + i-- + dAtA[i] = 0x2a + } + if len(m.NodeIp) > 0 { + i -= len(m.NodeIp) + copy(dAtA[i:], m.NodeIp) + i = encodeVarintHub(dAtA, i, uint64(len(m.NodeIp))) + i-- + dAtA[i] = 0x22 + } + if m.TimeUpdate != nil { + n9, err9 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(*m.TimeUpdate, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(*m.TimeUpdate):]) + if err9 != nil { + return 0, err9 + } + i -= n9 + i = encodeVarintHub(dAtA, i, uint64(n9)) + i-- + dAtA[i] = 0x1a + } + if m.TimeCreate != nil { + n10, err10 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(*m.TimeCreate, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(*m.TimeCreate):]) + if err10 != nil { + return 0, err10 + } + i -= n10 + i = encodeVarintHub(dAtA, i, uint64(n10)) + i-- + dAtA[i] = 0x12 + } + if len(m.NodeId) > 0 { + i -= len(m.NodeId) + copy(dAtA[i:], m.NodeId) + i = encodeVarintHub(dAtA, i, uint64(len(m.NodeId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Location) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Location) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Location) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Lon != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Lon)))) + i-- + dAtA[i] = 0x11 + } + if m.Lat != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Lat)))) + i-- + dAtA[i] = 0x9 + } + return len(dAtA) - i, nil +} + +func (m *StorageInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.StoragePriceEst != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.StoragePriceEst)))) + i-- + dAtA[i] = 0x2d + } + if m.StorageAskPrice != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.StorageAskPrice)))) + i-- + dAtA[i] = 0x25 + } + if m.StorageMinTime != 0 { + i = encodeVarintHub(dAtA, i, uint64(m.StorageMinTime)) + i-- + dAtA[i] = 0x18 + } + if m.StorageLeft != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.StorageLeft)))) + i-- + dAtA[i] = 0x15 + } + if m.StorageCap != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.StorageCap)))) + i-- + dAtA[i] = 0xd + } + return len(dAtA) - i, nil +} + +func (m *BandwidthInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BandwidthInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BandwidthInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.BandwidthPriceEst != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.BandwidthPriceEst)))) + i-- + dAtA[i] = 0x1d + } + if m.BandwidthAskPrice != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.BandwidthAskPrice)))) + i-- + dAtA[i] = 0x15 + } + if m.BandwidthLimit != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.BandwidthLimit)))) + i-- + dAtA[i] = 0xd + } + return len(dAtA) - i, nil +} + +func (m *CollateralInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CollateralInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CollateralInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.CollateralBurn != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.CollateralBurn)))) + i-- + dAtA[i] = 0x1d + } + if m.CollateralLost != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.CollateralLost)))) + i-- + dAtA[i] = 0x15 + } + if m.CollateralStake != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.CollateralStake)))) + i-- + dAtA[i] = 0xd + } + return len(dAtA) - i, nil +} + +func encodeVarintHub(dAtA []byte, offset int, v uint64) int { + offset -= sovHub(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *SettingsReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovHub(uint64(l)) + } + if m.RespSize != 0 { + n += 1 + sovHub(uint64(m.RespSize)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SettingsResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovHub(uint64(m.Code)) + } + l = len(m.Message) + if l > 0 { + n += 1 + l + sovHub(uint64(l)) + } + if m.ResponseTime != nil { + l = github_com_tron_us_protobuf_types.SizeOfStdTime(*m.ResponseTime) + n += 1 + l + sovHub(uint64(l)) + } + if m.SettingsData != nil { + l = m.SettingsData.Size() + n += 1 + l + sovHub(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SettingsData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.StoragePriceAsk != 0 { + n += 9 + } + if m.BandwidthPriceAsk != 0 { + n += 9 + } + if m.StorageTimeMin != 0 { + n += 9 + } + if m.BandwidthLimit != 0 { + n += 9 + } + if m.CollateralStake != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HostsReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovHub(uint64(l)) + } + if m.RespSize != 0 { + n += 1 + sovHub(uint64(m.RespSize)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HostsResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovHub(uint64(m.Code)) + } + l = len(m.Message) + if l > 0 { + n += 1 + l + sovHub(uint64(l)) + } + if m.Hosts != nil { + l = m.Hosts.Size() + n += 1 + l + sovHub(uint64(l)) + } + if m.RespSize != 0 { + n += 1 + sovHub(uint64(m.RespSize)) + } + l = len(m.Mode) + if l > 0 { + n += 1 + l + sovHub(uint64(l)) + } + if m.ResponseTime != nil { + l = github_com_tron_us_protobuf_types.SizeOfStdTime(*m.ResponseTime) + n += 1 + l + sovHub(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HostsData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Hosts) > 0 { + for _, e := range m.Hosts { + l = e.Size() + n += 1 + l + sovHub(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Host) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NodeId) + if l > 0 { + n += 1 + l + sovHub(uint64(l)) + } + if m.TimeCreate != nil { + l = github_com_tron_us_protobuf_types.SizeOfStdTime(*m.TimeCreate) + n += 1 + l + sovHub(uint64(l)) + } + if m.TimeUpdate != nil { + l = github_com_tron_us_protobuf_types.SizeOfStdTime(*m.TimeUpdate) + n += 1 + l + sovHub(uint64(l)) + } + l = len(m.NodeIp) + if l > 0 { + n += 1 + l + sovHub(uint64(l)) + } + l = len(m.Region) + if l > 0 { + n += 1 + l + sovHub(uint64(l)) + } + l = len(m.BtfsVersion) + if l > 0 { + n += 1 + l + sovHub(uint64(l)) + } + if m.Score != 0 { + n += 5 + } + if m.HeartBeats != 0 { + n += 1 + sovHub(uint64(m.HeartBeats)) + } + if m.Uptime != 0 { + n += 5 + } + if m.Age != 0 { + n += 1 + sovHub(uint64(m.Age)) + } + if m.Reputation != 0 { + n += 5 + } + if m.UploadAvg != 0 { + n += 5 + } + if m.UploadVar != 0 { + n += 5 + } + if m.DownloadAvg != 0 { + n += 5 + } + if m.DownloadVar != 0 { + n += 5 + } + if m.Location != nil { + l = m.Location.Size() + n += 2 + l + sovHub(uint64(l)) + } + if m.StorageInfo != nil { + l = m.StorageInfo.Size() + n += 2 + l + sovHub(uint64(l)) + } + if m.BandwidthInfo != nil { + l = m.BandwidthInfo.Size() + n += 2 + l + sovHub(uint64(l)) + } + if m.CollateralInfo != nil { + l = m.CollateralInfo.Size() + n += 2 + l + sovHub(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Location) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Lat != 0 { + n += 9 + } + if m.Lon != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StorageInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.StorageCap != 0 { + n += 5 + } + if m.StorageLeft != 0 { + n += 5 + } + if m.StorageMinTime != 0 { + n += 1 + sovHub(uint64(m.StorageMinTime)) + } + if m.StorageAskPrice != 0 { + n += 5 + } + if m.StoragePriceEst != 0 { + n += 5 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BandwidthInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BandwidthLimit != 0 { + n += 5 + } + if m.BandwidthAskPrice != 0 { + n += 5 + } + if m.BandwidthPriceEst != 0 { + n += 5 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CollateralInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CollateralStake != 0 { + n += 5 + } + if m.CollateralLost != 0 { + n += 5 + } + if m.CollateralBurn != 0 { + n += 5 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovHub(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozHub(x uint64) (n int) { + return sovHub(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *SettingsReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SettingsReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SettingsReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthHub + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthHub + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RespSize", wireType) + } + m.RespSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RespSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipHub(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SettingsResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SettingsResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SettingsResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= ResponseCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthHub + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthHub + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthHub + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthHub + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResponseTime == nil { + m.ResponseTime = new(time.Time) + } + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SettingsData", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthHub + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthHub + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SettingsData == nil { + m.SettingsData = &SettingsData{} + } + if err := m.SettingsData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipHub(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SettingsData) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SettingsData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SettingsData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceAsk", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.StoragePriceAsk = float64(math.Float64frombits(v)) + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthPriceAsk", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.BandwidthPriceAsk = float64(math.Float64frombits(v)) + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTimeMin", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.StorageTimeMin = float64(math.Float64frombits(v)) + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthLimit", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.BandwidthLimit = float64(math.Float64frombits(v)) + case 5: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field CollateralStake", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.CollateralStake = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipHub(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HostsReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HostsReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HostsReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthHub + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthHub + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RespSize", wireType) + } + m.RespSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RespSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipHub(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HostsResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HostsResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HostsResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= ResponseCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthHub + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthHub + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthHub + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthHub + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Hosts == nil { + m.Hosts = &HostsData{} + } + if err := m.Hosts.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RespSize", wireType) + } + m.RespSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RespSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthHub + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthHub + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mode = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthHub + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthHub + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResponseTime == nil { + m.ResponseTime = new(time.Time) + } + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipHub(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HostsData) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HostsData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HostsData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthHub + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthHub + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hosts = append(m.Hosts, &Host{}) + if err := m.Hosts[len(m.Hosts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipHub(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Host) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Host: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Host: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthHub + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthHub + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NodeId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeCreate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthHub + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthHub + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TimeCreate == nil { + m.TimeCreate = new(time.Time) + } + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(m.TimeCreate, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeUpdate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthHub + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthHub + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TimeUpdate == nil { + m.TimeUpdate = new(time.Time) + } + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(m.TimeUpdate, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeIp", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthHub + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthHub + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NodeIp = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Region", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthHub + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthHub + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Region = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BtfsVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthHub + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthHub + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BtfsVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Score = float32(math.Float32frombits(v)) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HeartBeats", wireType) + } + m.HeartBeats = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HeartBeats |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Uptime", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Uptime = float32(math.Float32frombits(v)) + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Age", wireType) + } + m.Age = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Age |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Reputation", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Reputation = float32(math.Float32frombits(v)) + case 12: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field UploadAvg", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.UploadAvg = float32(math.Float32frombits(v)) + case 13: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field UploadVar", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.UploadVar = float32(math.Float32frombits(v)) + case 14: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field DownloadAvg", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.DownloadAvg = float32(math.Float32frombits(v)) + case 15: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field DownloadVar", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.DownloadVar = float32(math.Float32frombits(v)) + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthHub + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthHub + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Location == nil { + m.Location = &Location{} + } + if err := m.Location.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthHub + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthHub + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StorageInfo == nil { + m.StorageInfo = &StorageInfo{} + } + if err := m.StorageInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthHub + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthHub + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BandwidthInfo == nil { + m.BandwidthInfo = &BandwidthInfo{} + } + if err := m.BandwidthInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CollateralInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthHub + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthHub + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CollateralInfo == nil { + m.CollateralInfo = &CollateralInfo{} + } + if err := m.CollateralInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipHub(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Location) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Location: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Location: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Lat", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Lat = float64(math.Float64frombits(v)) + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Lon", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Lon = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipHub(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageCap", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.StorageCap = float32(math.Float32frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageLeft", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.StorageLeft = float32(math.Float32frombits(v)) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageMinTime", wireType) + } + m.StorageMinTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageMinTime |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageAskPrice", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.StorageAskPrice = float32(math.Float32frombits(v)) + case 5: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field StoragePriceEst", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.StoragePriceEst = float32(math.Float32frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipHub(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BandwidthInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BandwidthInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BandwidthInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthLimit", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.BandwidthLimit = float32(math.Float32frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthAskPrice", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.BandwidthAskPrice = float32(math.Float32frombits(v)) + case 3: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field BandwidthPriceEst", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.BandwidthPriceEst = float32(math.Float32frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipHub(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CollateralInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHub + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CollateralInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CollateralInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field CollateralStake", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.CollateralStake = float32(math.Float32frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field CollateralLost", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.CollateralLost = float32(math.Float32frombits(v)) + case 3: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field CollateralBurn", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.CollateralBurn = float32(math.Float32frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipHub(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHub + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipHub(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowHub + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowHub + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowHub + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthHub + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupHub + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthHub + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthHub = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowHub = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupHub = fmt.Errorf("proto: unexpected end of group") +) diff --git a/protos/hub/hub.proto b/protos/hub/hub.proto index 2bebffb..2ea5425 100644 --- a/protos/hub/hub.proto +++ b/protos/hub/hub.proto @@ -2,6 +2,13 @@ syntax = "proto3"; package hub; +// gogo plugin toggles +option (gogoproto.gogoproto_import) = true; +option (gogoproto.goproto_registration) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.messagename_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; // golang option option go_package = "hub"; // java options From 12cf1d86173ab9c88a5b8e15a3b5cd7b18dc84d7 Mon Sep 17 00:00:00 2001 From: Robin Lai Date: Fri, 22 Nov 2019 16:59:25 -0800 Subject: [PATCH 4/5] recompile hub.proto --- protos/hub/hub.pb.go | 278 +++++++++++++++++++------------------------ protos/hub/hub.proto | 20 +++- 2 files changed, 141 insertions(+), 157 deletions(-) diff --git a/protos/hub/hub.pb.go b/protos/hub/hub.pb.go index f6639a6..f0c307f 100644 --- a/protos/hub/hub.pb.go +++ b/protos/hub/hub.pb.go @@ -127,7 +127,7 @@ func (*SettingsReq) XXX_MessageName() string { type SettingsResp struct { Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=hub.ResponseCode" json:"code,omitempty" pg:"code"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` - ResponseTime *time.Time `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time,omitempty" pg:"response_time"` + ResponseTime time.Time `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time" pg:"response_time"` SettingsData *SettingsData `protobuf:"bytes,4,opt,name=settings_data,json=settingsData,proto3" json:"settings_data,omitempty" pg:"settings_data"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` @@ -181,11 +181,11 @@ func (m *SettingsResp) GetMessage() string { return "" } -func (m *SettingsResp) GetResponseTime() *time.Time { +func (m *SettingsResp) GetResponseTime() time.Time { if m != nil { return m.ResponseTime } - return nil + return time.Time{} } func (m *SettingsResp) GetSettingsData() *SettingsData { @@ -347,7 +347,7 @@ type HostsResp struct { Hosts *HostsData `protobuf:"bytes,3,opt,name=hosts,proto3" json:"hosts,omitempty" pg:"hosts"` RespSize int32 `protobuf:"varint,4,opt,name=resp_size,json=respSize,proto3" json:"resp_size,omitempty" pg:"resp_size"` Mode string `protobuf:"bytes,5,opt,name=mode,proto3" json:"mode,omitempty" pg:"mode"` - ResponseTime *time.Time `protobuf:"bytes,6,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time,omitempty" pg:"response_time"` + ResponseTime time.Time `protobuf:"bytes,6,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time" pg:"response_time"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` @@ -421,11 +421,11 @@ func (m *HostsResp) GetMode() string { return "" } -func (m *HostsResp) GetResponseTime() *time.Time { +func (m *HostsResp) GetResponseTime() time.Time { if m != nil { return m.ResponseTime } - return nil + return time.Time{} } func (*HostsResp) XXX_MessageName() string { @@ -485,8 +485,8 @@ func (*HostsData) XXX_MessageName() string { type Host struct { NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` - TimeCreate *time.Time `protobuf:"bytes,2,opt,name=time_create,json=timeCreate,proto3,stdtime" json:"time_create,omitempty" pg:"time_create"` - TimeUpdate *time.Time `protobuf:"bytes,3,opt,name=time_update,json=timeUpdate,proto3,stdtime" json:"time_update,omitempty" pg:"time_update"` + TimeCreate time.Time `protobuf:"bytes,2,opt,name=time_create,json=timeCreate,proto3,stdtime" json:"time_create" pg:"time_create"` + TimeUpdate time.Time `protobuf:"bytes,3,opt,name=time_update,json=timeUpdate,proto3,stdtime" json:"time_update" pg:"time_update"` NodeIp string `protobuf:"bytes,4,opt,name=node_ip,json=nodeIp,proto3" json:"node_ip,omitempty" pg:"node_ip"` Region string `protobuf:"bytes,5,opt,name=region,proto3" json:"region,omitempty" pg:"region"` BtfsVersion string `protobuf:"bytes,6,opt,name=btfs_version,json=btfsVersion,proto3" json:"btfs_version,omitempty" pg:"btfs_version"` @@ -548,18 +548,18 @@ func (m *Host) GetNodeId() string { return "" } -func (m *Host) GetTimeCreate() *time.Time { +func (m *Host) GetTimeCreate() time.Time { if m != nil { return m.TimeCreate } - return nil + return time.Time{} } -func (m *Host) GetTimeUpdate() *time.Time { +func (m *Host) GetTimeUpdate() time.Time { if m != nil { return m.TimeUpdate } - return nil + return time.Time{} } func (m *Host) GetNodeIp() string { @@ -984,77 +984,77 @@ func init() { proto.RegisterFile("protos/hub/hub.proto", fileDescriptor_c704b599 func init() { golang_proto.RegisterFile("protos/hub/hub.proto", fileDescriptor_c704b5990190a69f) } var fileDescriptor_c704b5990190a69f = []byte{ - // 1111 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x6f, 0x23, 0xc5, - 0x13, 0xfd, 0xb5, 0xff, 0x24, 0x76, 0x8d, 0xed, 0x38, 0xbd, 0xfb, 0x5b, 0x4c, 0x10, 0x8e, 0xb1, - 0x40, 0x78, 0x57, 0xe0, 0x48, 0x5e, 0x69, 0x11, 0x08, 0x21, 0xd9, 0x8e, 0x49, 0x22, 0x25, 0x24, - 0x6a, 0x27, 0x7b, 0xe0, 0x32, 0x6a, 0x7b, 0xda, 0xce, 0x28, 0xf6, 0xf4, 0xec, 0x74, 0x3b, 0x2b, - 0xed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d0, 0xf7, 0xe1, - 0xff, 0xc3, 0xd3, 0x93, 0xb3, 0x8b, 0xf3, 0x91, 0xdd, 0xdf, 0xdf, 0x67, 0xa3, 0xf1, 0x38, 0x4a, - 0xe5, 0xe8, 0x16, 0x58, 0xa7, 0xe7, 0x87, 0x23, 0x16, 0x01, 0x0f, 0x7b, 0xdf, 0x40, 0x29, 0x7e, - 0xad, 0x69, 0x0f, 0xac, 0x03, 0xa1, 0x93, 0xb0, 0xbe, 0xf6, 0xd4, 0x33, 0xf1, 0x62, 0x67, 0xfb, - 0x0e, 0xa2, 0xfc, 0x5e, 0x0f, 0x8a, 0xe8, 0xee, 0xe6, 0xbb, 0x3d, 0x10, 0x3a, 0x5c, 0x57, 0xd3, - 0x17, 0xc8, 0xd0, 0x6a, 0xd9, 0x50, 0xf9, 0x83, 0x67, 0x6f, 0x6e, 0x9a, 0xe4, 0x97, 0x9b, 0x26, - 0xf9, 0xe3, 0xa6, 0x49, 0x5e, 0xdf, 0x36, 0xc9, 0x4f, 0xb7, 0x4d, 0xf2, 0xe6, 0xb6, 0x49, 0xc0, - 0x72, 0x65, 0xd7, 0x38, 0xa2, 0x21, 0x0c, 0x4a, 0x87, 0xab, 0xc9, 0x99, 0xf1, 0xe2, 0x33, 0xf2, - 0xbd, 0xf9, 0xdd, 0x36, 0xd9, 0x40, 0x67, 0x7e, 0xfa, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, - 0x85, 0xc9, 0xf4, 0xdb, 0x09, 0x00, 0x00, + // 1114 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6e, 0x23, 0xc5, + 0x13, 0xde, 0xb6, 0xe3, 0xc4, 0xae, 0xb1, 0x1d, 0xa7, 0x77, 0x7f, 0xfb, 0x33, 0x41, 0x38, 0xc6, + 0x02, 0xe1, 0x5d, 0x81, 0x23, 0x79, 0xa5, 0x45, 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1, 0xa8, 0xf6, 0x80, 0x6e, 0xc3, 0xe3, 0xd1, 0xe1, 0xfe, 0xf7, + 0xbd, 0xb3, 0x73, 0x36, 0xb4, 0xbf, 0x3b, 0x61, 0xc7, 0xbd, 0x33, 0x7b, 0xc8, 0xd8, 0x09, 0xab, + 0x11, 0xfa, 0x01, 0xfc, 0x6f, 0x70, 0x72, 0x7c, 0x7a, 0x7e, 0x36, 0xb4, 0x7b, 0x7b, 0x7b, 0x6c, + 0x38, 0x1a, 0x45, 0xae, 0x1c, 0xdd, 0x04, 0xeb, 0xe4, 0xec, 0x60, 0xc8, 0x22, 0xe0, 0x51, 0xf7, + 0x5b, 0x28, 0xc6, 0x9b, 0x9b, 0x76, 0xc1, 0xda, 0x17, 0x3a, 0x31, 0x6b, 0x2b, 0x6b, 0x9f, 0x89, + 0x97, 0xdb, 0x5b, 0x77, 0x10, 0xe5, 0x77, 0xbb, 0x50, 0xc0, 0x29, 0x6f, 0xbe, 0xdb, 0x7d, 0xa1, + 0xc3, 0x73, 0x25, 0xdd, 0x46, 0x86, 0x56, 0xcd, 0x9a, 0xca, 0xef, 0x3f, 0xbf, 0xbe, 0x69, 0x90, + 0x5f, 0x6e, 0x1a, 0xe4, 0x8f, 0x9b, 0x06, 0x79, 0x73, 0xdb, 0x20, 0x3f, 0xdf, 0x36, 0xc8, 0xf5, + 0x6d, 0x83, 0x80, 0xe5, 0xca, 0x8e, 0x99, 0x88, 0x86, 0xd0, 0x2f, 0x1e, 0x2c, 0xc7, 0xa7, 0x66, + 0x1e, 0x9f, 0x92, 0x1f, 0xcc, 0xef, 0xb8, 0xf1, 0x3a, 0x4e, 0xe7, 0x67, 0x7f, 0x07, 0x00, 0x00, + 0xff, 0xff, 0x6c, 0x10, 0x7f, 0x88, 0xeb, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1284,16 +1284,14 @@ func (m *SettingsResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - if m.ResponseTime != nil { - n2, err2 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(*m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(*m.ResponseTime):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintHub(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x1a + n2, err2 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) + if err2 != nil { + return 0, err2 } + i -= n2 + i = encodeVarintHub(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x1a if len(m.Message) > 0 { i -= len(m.Message) copy(dAtA[i:], m.Message) @@ -1429,16 +1427,14 @@ func (m *HostsResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if m.ResponseTime != nil { - n3, err3 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(*m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(*m.ResponseTime):]) - if err3 != nil { - return 0, err3 - } - i -= n3 - i = encodeVarintHub(dAtA, i, uint64(n3)) - i-- - dAtA[i] = 0x32 + n3, err3 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) + if err3 != nil { + return 0, err3 } + i -= n3 + i = encodeVarintHub(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0x32 if len(m.Mode) > 0 { i -= len(m.Mode) copy(dAtA[i:], m.Mode) @@ -1672,26 +1668,22 @@ func (m *Host) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - if m.TimeUpdate != nil { - n9, err9 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(*m.TimeUpdate, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(*m.TimeUpdate):]) - if err9 != nil { - return 0, err9 - } - i -= n9 - i = encodeVarintHub(dAtA, i, uint64(n9)) - i-- - dAtA[i] = 0x1a - } - if m.TimeCreate != nil { - n10, err10 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(*m.TimeCreate, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(*m.TimeCreate):]) - if err10 != nil { - return 0, err10 - } - i -= n10 - i = encodeVarintHub(dAtA, i, uint64(n10)) - i-- - dAtA[i] = 0x12 - } + n9, err9 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.TimeUpdate, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.TimeUpdate):]) + if err9 != nil { + return 0, err9 + } + i -= n9 + i = encodeVarintHub(dAtA, i, uint64(n9)) + i-- + dAtA[i] = 0x1a + n10, err10 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.TimeCreate, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.TimeCreate):]) + if err10 != nil { + return 0, err10 + } + i -= n10 + i = encodeVarintHub(dAtA, i, uint64(n10)) + i-- + dAtA[i] = 0x12 if len(m.NodeId) > 0 { i -= len(m.NodeId) copy(dAtA[i:], m.NodeId) @@ -1930,10 +1922,8 @@ func (m *SettingsResp) Size() (n int) { if l > 0 { n += 1 + l + sovHub(uint64(l)) } - if m.ResponseTime != nil { - l = github_com_tron_us_protobuf_types.SizeOfStdTime(*m.ResponseTime) - n += 1 + l + sovHub(uint64(l)) - } + l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) + n += 1 + l + sovHub(uint64(l)) if m.SettingsData != nil { l = m.SettingsData.Size() n += 1 + l + sovHub(uint64(l)) @@ -2014,10 +2004,8 @@ func (m *HostsResp) Size() (n int) { if l > 0 { n += 1 + l + sovHub(uint64(l)) } - if m.ResponseTime != nil { - l = github_com_tron_us_protobuf_types.SizeOfStdTime(*m.ResponseTime) - n += 1 + l + sovHub(uint64(l)) - } + l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) + n += 1 + l + sovHub(uint64(l)) if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -2052,14 +2040,10 @@ func (m *Host) Size() (n int) { if l > 0 { n += 1 + l + sovHub(uint64(l)) } - if m.TimeCreate != nil { - l = github_com_tron_us_protobuf_types.SizeOfStdTime(*m.TimeCreate) - n += 1 + l + sovHub(uint64(l)) - } - if m.TimeUpdate != nil { - l = github_com_tron_us_protobuf_types.SizeOfStdTime(*m.TimeUpdate) - n += 1 + l + sovHub(uint64(l)) - } + l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.TimeCreate) + n += 1 + l + sovHub(uint64(l)) + l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.TimeUpdate) + n += 1 + l + sovHub(uint64(l)) l = len(m.NodeIp) if l > 0 { n += 1 + l + sovHub(uint64(l)) @@ -2428,10 +2412,7 @@ func (m *SettingsResp) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ResponseTime == nil { - m.ResponseTime = new(time.Time) - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2906,10 +2887,7 @@ func (m *HostsResp) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ResponseTime == nil { - m.ResponseTime = new(time.Time) - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3116,10 +3094,7 @@ func (m *Host) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TimeCreate == nil { - m.TimeCreate = new(time.Time) - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(m.TimeCreate, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.TimeCreate, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3152,10 +3127,7 @@ func (m *Host) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TimeUpdate == nil { - m.TimeUpdate = new(time.Time) - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(m.TimeUpdate, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.TimeUpdate, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/protos/hub/hub.proto b/protos/hub/hub.proto index 2ea5425..093125e 100644 --- a/protos/hub/hub.proto +++ b/protos/hub/hub.proto @@ -42,7 +42,10 @@ enum ResponseCode { message SettingsResp { ResponseCode code = 1; string message = 2; - google.protobuf.Timestamp response_time = 3 [(gogoproto.stdtime) = true]; + google.protobuf.Timestamp response_time = 3 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; SettingsData settings_data = 4; } @@ -65,7 +68,10 @@ message HostsResp { HostsData hosts = 3; int32 resp_size = 4; string mode = 5; - google.protobuf.Timestamp response_time = 6 [(gogoproto.stdtime) = true]; + google.protobuf.Timestamp response_time = 6 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; } message HostsData { @@ -74,8 +80,14 @@ message HostsData { message Host { string node_id = 1; - google.protobuf.Timestamp time_create = 2 [(gogoproto.stdtime) = true]; - google.protobuf.Timestamp time_update = 3 [(gogoproto.stdtime) = true]; + google.protobuf.Timestamp time_create = 2 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; + google.protobuf.Timestamp time_update = 3 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; string node_ip = 4; string region = 5; string btfs_version = 6; From e6ec01b0eb6472450a9ce7cd2fc4c6336df6b5a8 Mon Sep 17 00:00:00 2001 From: Robin Lai Date: Fri, 22 Nov 2019 17:06:40 -0800 Subject: [PATCH 5/5] recompile pb --- protos/node/node.pb.go | 22 ++++++++++----------- protos/status/status.pb.go | 40 +++++++++++++++++++------------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/protos/node/node.pb.go b/protos/node/node.pb.go index c2ec03c..e7479b2 100644 --- a/protos/node/node.pb.go +++ b/protos/node/node.pb.go @@ -31,7 +31,7 @@ var _ = time.Kitchen const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Node struct { - TableName string `protobuf:"bytes,1,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty" pg:"table_name" pg:"node_metrics,alias:t,discard_unknown_columns"` + tableName string `pg:"node_metrics,alias:t,discard_unknown_columns"` NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` BtfsVersion string `protobuf:"bytes,3,opt,name=btfs_version,json=btfsVersion,proto3" json:"btfs_version,omitempty" pg:"btfs_version"` UpTime uint64 `protobuf:"varint,4,opt,name=up_time,json=upTime,proto3" json:"up_time,omitempty" pg:"up_time"` @@ -93,9 +93,9 @@ func (m *Node) XXX_DiscardUnknown() { var xxx_messageInfo_Node proto.InternalMessageInfo -func (m *Node) GetTableName() string { +func (m *Node) GettableName() string { if m != nil { - return m.TableName + return m.tableName } return "" } @@ -582,10 +582,10 @@ func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.TableName) > 0 { - i -= len(m.TableName) - copy(dAtA[i:], m.TableName) - i = encodeVarintNode(dAtA, i, uint64(len(m.TableName))) + if len(m.tableName) > 0 { + i -= len(m.tableName) + copy(dAtA[i:], m.tableName) + i = encodeVarintNode(dAtA, i, uint64(len(m.tableName))) i-- dAtA[i] = 0xa } @@ -658,7 +658,7 @@ func encodeVarintNode(dAtA []byte, offset int, v uint64) int { } func NewPopulatedNode(r randyNode, easy bool) *Node { this := &Node{} - this.TableName = string(randStringNode(r)) + this.tableName = string(randStringNode(r)) this.NodeId = string(randStringNode(r)) this.BtfsVersion = string(randStringNode(r)) this.UpTime = uint64(uint64(r.Uint32())) @@ -790,7 +790,7 @@ func (m *Node) Size() (n int) { } var l int _ = l - l = len(m.TableName) + l = len(m.tableName) if l > 0 { n += 1 + l + sovNode(uint64(l)) } @@ -937,7 +937,7 @@ func (m *Node) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TableName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field tableName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -965,7 +965,7 @@ func (m *Node) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TableName = string(dAtA[iNdEx:postIndex]) + m.tableName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { diff --git a/protos/status/status.pb.go b/protos/status/status.pb.go index f587c3d..c9aa418 100644 --- a/protos/status/status.pb.go +++ b/protos/status/status.pb.go @@ -102,7 +102,7 @@ func (*SignedMetrics) XXX_MessageName() string { } type NodeHealth struct { - TableName string `protobuf:"bytes,1,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty" pg:"table_name" pg:"health_monitoring,alias:t,discard_unknown_columns"` + tableName string `pg:"health_monitoring,alias:t,discard_unknown_columns"` NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` BtfsVersion string `protobuf:"bytes,3,opt,name=btfs_version,json=btfsVersion,proto3" json:"btfs_version,omitempty" pg:"btfs_version"` FailurePoint string `protobuf:"bytes,4,opt,name=failure_point,json=failurePoint,proto3" json:"failure_point,omitempty" pg:"failure_point"` @@ -145,9 +145,9 @@ func (m *NodeHealth) XXX_DiscardUnknown() { var xxx_messageInfo_NodeHealth proto.InternalMessageInfo -func (m *NodeHealth) GetTableName() string { +func (m *NodeHealth) GettableName() string { if m != nil { - return m.TableName + return m.tableName } return "" } @@ -185,7 +185,7 @@ func (*NodeHealth) XXX_MessageName() string { } type NodeError struct { - TableName string `protobuf:"bytes,1,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty" pg:"table_name" pg:"test_error,alias:t,discard_unknown_columns"` + tableName string `pg:"test_error,alias:t,discard_unknown_columns"` HVal string `protobuf:"bytes,2,opt,name=h_val,json=hVal,proto3" json:"h_val,omitempty" pg:"h_val"` PeerId string `protobuf:"bytes,3,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty" pg:"peer_id"` ErrorStatus string `protobuf:"bytes,4,opt,name=error_status,json=errorStatus,proto3" json:"error_status,omitempty" pg:"error_status"` @@ -228,9 +228,9 @@ func (m *NodeError) XXX_DiscardUnknown() { var xxx_messageInfo_NodeError proto.InternalMessageInfo -func (m *NodeError) GetTableName() string { +func (m *NodeError) GettableName() string { if m != nil { - return m.TableName + return m.tableName } return "" } @@ -688,10 +688,10 @@ func (m *NodeHealth) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.TableName) > 0 { - i -= len(m.TableName) - copy(dAtA[i:], m.TableName) - i = encodeVarintStatus(dAtA, i, uint64(len(m.TableName))) + if len(m.tableName) > 0 { + i -= len(m.tableName) + copy(dAtA[i:], m.tableName) + i = encodeVarintStatus(dAtA, i, uint64(len(m.tableName))) i-- dAtA[i] = 0xa } @@ -751,10 +751,10 @@ func (m *NodeError) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.TableName) > 0 { - i -= len(m.TableName) - copy(dAtA[i:], m.TableName) - i = encodeVarintStatus(dAtA, i, uint64(len(m.TableName))) + if len(m.tableName) > 0 { + i -= len(m.tableName) + copy(dAtA[i:], m.tableName) + i = encodeVarintStatus(dAtA, i, uint64(len(m.tableName))) i-- dAtA[i] = 0xa } @@ -883,7 +883,7 @@ func (m *NodeHealth) Size() (n int) { } var l int _ = l - l = len(m.TableName) + l = len(m.tableName) if l > 0 { n += 1 + l + sovStatus(uint64(l)) } @@ -913,7 +913,7 @@ func (m *NodeError) Size() (n int) { } var l int _ = l - l = len(m.TableName) + l = len(m.tableName) if l > 0 { n += 1 + l + sovStatus(uint64(l)) } @@ -1172,7 +1172,7 @@ func (m *NodeHealth) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TableName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field tableName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1200,7 +1200,7 @@ func (m *NodeHealth) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TableName = string(dAtA[iNdEx:postIndex]) + m.tableName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -1387,7 +1387,7 @@ func (m *NodeError) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TableName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field tableName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1415,7 +1415,7 @@ func (m *NodeError) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TableName = string(dAtA[iNdEx:postIndex]) + m.tableName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 {