From 7a9ecd0d0e4097cda407a2a1ee8abed55e84dcfa Mon Sep 17 00:00:00 2001 From: FZambia Date: Fri, 10 May 2024 11:03:43 +0300 Subject: [PATCH] use int64 to match go type --- client.pb.go | 6 +++--- client.pb_easyjson.go | 4 ++-- client.proto | 2 +- client_vtproto.pb.go | 2 +- definitions/client.proto | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client.pb.go b/client.pb.go index a9e78da..9da7d96 100644 --- a/client.pb.go +++ b/client.pb.go @@ -1326,7 +1326,7 @@ type ConnectResult struct { Pong bool `protobuf:"varint,8,opt,name=pong,proto3" json:"pong,omitempty"` Session string `protobuf:"bytes,9,opt,name=session,proto3" json:"session,omitempty"` Node string `protobuf:"bytes,10,opt,name=node,proto3" json:"node,omitempty"` - TimeMs uint64 `protobuf:"varint,11,opt,name=time_ms,json=timeMs,proto3" json:"time_ms,omitempty"` // Server time as Unix timestamp in milliseconds (not sent by default). + TimeMs int64 `protobuf:"varint,11,opt,name=time_ms,json=timeMs,proto3" json:"time_ms,omitempty"` // Server time as Unix timestamp in milliseconds (not sent by default). } func (x *ConnectResult) Reset() { @@ -1431,7 +1431,7 @@ func (x *ConnectResult) GetNode() string { return "" } -func (x *ConnectResult) GetTimeMs() uint64 { +func (x *ConnectResult) GetTimeMs() int64 { if x != nil { return x.TimeMs } @@ -2985,7 +2985,7 @@ var file_client_proto_rawDesc = []byte{ 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, - 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x74, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x1a, + 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x74, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x1a, 0x69, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, diff --git a/client.pb_easyjson.go b/client.pb_easyjson.go index 0c1a2ab..fe594ac 100644 --- a/client.pb_easyjson.go +++ b/client.pb_easyjson.go @@ -3041,7 +3041,7 @@ func easyjson19c08265DecodeGithubComCentrifugalProtocolBuild34(in *jlexer.Lexer, case "node": out.Node = string(in.String()) case "time_ms": - out.TimeMs = uint64(in.Uint64()) + out.TimeMs = int64(in.Int64()) default: in.SkipRecursive() } @@ -3178,7 +3178,7 @@ func easyjson19c08265EncodeGithubComCentrifugalProtocolBuild34(out *writer, in C } else { out.RawString(prefix) } - out.Uint64(uint64(in.TimeMs)) + out.Int64(int64(in.TimeMs)) } out.RawByte('}') } diff --git a/client.proto b/client.proto index eea658e..24d7f22 100644 --- a/client.proto +++ b/client.proto @@ -174,7 +174,7 @@ message ConnectResult { bool pong = 8; string session = 9; string node = 10; - uint64 time_ms = 11; // Server time as Unix timestamp in milliseconds (not sent by default). + int64 time_ms = 11; // Server time as Unix timestamp in milliseconds (not sent by default). } message RefreshRequest { diff --git a/client_vtproto.pb.go b/client_vtproto.pb.go index bb71877..9db23b7 100644 --- a/client_vtproto.pb.go +++ b/client_vtproto.pb.go @@ -7535,7 +7535,7 @@ func (m *ConnectResult) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TimeMs |= uint64(b&0x7F) << shift + m.TimeMs |= int64(b&0x7F) << shift if b < 0x80 { break } diff --git a/definitions/client.proto b/definitions/client.proto index eea658e..24d7f22 100644 --- a/definitions/client.proto +++ b/definitions/client.proto @@ -174,7 +174,7 @@ message ConnectResult { bool pong = 8; string session = 9; string node = 10; - uint64 time_ms = 11; // Server time as Unix timestamp in milliseconds (not sent by default). + int64 time_ms = 11; // Server time as Unix timestamp in milliseconds (not sent by default). } message RefreshRequest {