update refresh

This commit is contained in:
2026-07-06 12:58:27 +07:00
parent e4007eb15a
commit 57687d1d62
15 changed files with 483 additions and 66 deletions
+136 -19
View File
@@ -478,6 +478,110 @@ func (x *LoginRsp) GetRefreshToken() string {
return ""
}
type RefreshReq struct {
state protoimpl.MessageState `protogen:"open.v1"`
RefreshToken string `protobuf:"bytes,1,opt,name=refreshToken,proto3" json:"refreshToken,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *RefreshReq) Reset() {
*x = RefreshReq{}
mi := &file_main_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *RefreshReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RefreshReq) ProtoMessage() {}
func (x *RefreshReq) ProtoReflect() protoreflect.Message {
mi := &file_main_proto_msgTypes[10]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RefreshReq.ProtoReflect.Descriptor instead.
func (*RefreshReq) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{10}
}
func (x *RefreshReq) GetRefreshToken() string {
if x != nil {
return x.RefreshToken
}
return ""
}
type RefreshRsp struct {
state protoimpl.MessageState `protogen:"open.v1"`
Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
AccessToken string `protobuf:"bytes,2,opt,name=accessToken,proto3" json:"accessToken,omitempty"`
RefreshToken string `protobuf:"bytes,3,opt,name=refreshToken,proto3" json:"refreshToken,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *RefreshRsp) Reset() {
*x = RefreshRsp{}
mi := &file_main_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *RefreshRsp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RefreshRsp) ProtoMessage() {}
func (x *RefreshRsp) ProtoReflect() protoreflect.Message {
mi := &file_main_proto_msgTypes[11]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RefreshRsp.ProtoReflect.Descriptor instead.
func (*RefreshRsp) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{11}
}
func (x *RefreshRsp) GetError() string {
if x != nil {
return x.Error
}
return ""
}
func (x *RefreshRsp) GetAccessToken() string {
if x != nil {
return x.AccessToken
}
return ""
}
func (x *RefreshRsp) GetRefreshToken() string {
if x != nil {
return x.RefreshToken
}
return ""
}
var File_main_proto protoreflect.FileDescriptor
const file_main_proto_rawDesc = "" +
@@ -505,14 +609,23 @@ const file_main_proto_rawDesc = "" +
"\bLoginRsp\x12\x14\n" +
"\x05error\x18\x01 \x01(\tR\x05error\x12 \n" +
"\vaccessToken\x18\x02 \x01(\tR\vaccessToken\x12\"\n" +
"\frefreshToken\x18\x03 \x01(\tR\frefreshToken2\xfc\x04\n" +
"\frefreshToken\x18\x03 \x01(\tR\frefreshToken\"0\n" +
"\n" +
"RefreshReq\x12\"\n" +
"\frefreshToken\x18\x01 \x01(\tR\frefreshToken\"h\n" +
"\n" +
"RefreshRsp\x12\x14\n" +
"\x05error\x18\x01 \x01(\tR\x05error\x12 \n" +
"\vaccessToken\x18\x02 \x01(\tR\vaccessToken\x12\"\n" +
"\frefreshToken\x18\x03 \x01(\tR\frefreshToken2\xf8\x05\n" +
"\x16EveningDetectiveServer\x12k\n" +
"\x04Ping\x12'.crabs.evening_detective_server.PingReq\x1a'.crabs.evening_detective_server.PingRsp\"\x11\x82\xd3\xe4\x93\x02\v\x12\t/api/ping\x12k\n" +
"\x04Echo\x12'.crabs.evening_detective_server.EchoReq\x1a'.crabs.evening_detective_server.EchoRsp\"\x11\x82\xd3\xe4\x93\x02\v\"\t/api/echo\x12v\n" +
"\x06Signup\x12).crabs.evening_detective_server.SignupReq\x1a).crabs.evening_detective_server.SignupRsp\"\x16\x82\xd3\xe4\x93\x02\x10:\x01*\"\v/api/signup\x12\x9b\x01\n" +
"\x0fRefreshPassword\x122.crabs.evening_detective_server.RefreshPasswordReq\x1a2.crabs.evening_detective_server.RefreshPasswordRsp\" \x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/api/refresh-password\x12r\n" +
"\x05Login\x12(.crabs.evening_detective_server.LoginReq\x1a(.crabs.evening_detective_server.LoginRsp\"\x15\x82\xd3\xe4\x93\x02\x0f:\x01*\"\n" +
"/api/loginB\vZ\tpkg/protob\x06proto3"
"/api/login\x12z\n" +
"\aRefresh\x12*.crabs.evening_detective_server.RefreshReq\x1a*.crabs.evening_detective_server.RefreshRsp\"\x17\x82\xd3\xe4\x93\x02\x11:\x01*\"\f/api/refreshB\vZ\tpkg/protob\x06proto3"
var (
file_main_proto_rawDescOnce sync.Once
@@ -526,7 +639,7 @@ func file_main_proto_rawDescGZIP() []byte {
return file_main_proto_rawDescData
}
var file_main_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_main_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_main_proto_goTypes = []any{
(*PingReq)(nil), // 0: crabs.evening_detective_server.PingReq
(*PingRsp)(nil), // 1: crabs.evening_detective_server.PingRsp
@@ -538,23 +651,27 @@ var file_main_proto_goTypes = []any{
(*RefreshPasswordRsp)(nil), // 7: crabs.evening_detective_server.RefreshPasswordRsp
(*LoginReq)(nil), // 8: crabs.evening_detective_server.LoginReq
(*LoginRsp)(nil), // 9: crabs.evening_detective_server.LoginRsp
(*RefreshReq)(nil), // 10: crabs.evening_detective_server.RefreshReq
(*RefreshRsp)(nil), // 11: crabs.evening_detective_server.RefreshRsp
}
var file_main_proto_depIdxs = []int32{
0, // 0: crabs.evening_detective_server.EveningDetectiveServer.Ping:input_type -> crabs.evening_detective_server.PingReq
2, // 1: crabs.evening_detective_server.EveningDetectiveServer.Echo:input_type -> crabs.evening_detective_server.EchoReq
4, // 2: crabs.evening_detective_server.EveningDetectiveServer.Signup:input_type -> crabs.evening_detective_server.SignupReq
6, // 3: crabs.evening_detective_server.EveningDetectiveServer.RefreshPassword:input_type -> crabs.evening_detective_server.RefreshPasswordReq
8, // 4: crabs.evening_detective_server.EveningDetectiveServer.Login:input_type -> crabs.evening_detective_server.LoginReq
1, // 5: crabs.evening_detective_server.EveningDetectiveServer.Ping:output_type -> crabs.evening_detective_server.PingRsp
3, // 6: crabs.evening_detective_server.EveningDetectiveServer.Echo:output_type -> crabs.evening_detective_server.EchoRsp
5, // 7: crabs.evening_detective_server.EveningDetectiveServer.Signup:output_type -> crabs.evening_detective_server.SignupRsp
7, // 8: crabs.evening_detective_server.EveningDetectiveServer.RefreshPassword:output_type -> crabs.evening_detective_server.RefreshPasswordRsp
9, // 9: crabs.evening_detective_server.EveningDetectiveServer.Login:output_type -> crabs.evening_detective_server.LoginRsp
5, // [5:10] is the sub-list for method output_type
0, // [0:5] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
0, // 0: crabs.evening_detective_server.EveningDetectiveServer.Ping:input_type -> crabs.evening_detective_server.PingReq
2, // 1: crabs.evening_detective_server.EveningDetectiveServer.Echo:input_type -> crabs.evening_detective_server.EchoReq
4, // 2: crabs.evening_detective_server.EveningDetectiveServer.Signup:input_type -> crabs.evening_detective_server.SignupReq
6, // 3: crabs.evening_detective_server.EveningDetectiveServer.RefreshPassword:input_type -> crabs.evening_detective_server.RefreshPasswordReq
8, // 4: crabs.evening_detective_server.EveningDetectiveServer.Login:input_type -> crabs.evening_detective_server.LoginReq
10, // 5: crabs.evening_detective_server.EveningDetectiveServer.Refresh:input_type -> crabs.evening_detective_server.RefreshReq
1, // 6: crabs.evening_detective_server.EveningDetectiveServer.Ping:output_type -> crabs.evening_detective_server.PingRsp
3, // 7: crabs.evening_detective_server.EveningDetectiveServer.Echo:output_type -> crabs.evening_detective_server.EchoRsp
5, // 8: crabs.evening_detective_server.EveningDetectiveServer.Signup:output_type -> crabs.evening_detective_server.SignupRsp
7, // 9: crabs.evening_detective_server.EveningDetectiveServer.RefreshPassword:output_type -> crabs.evening_detective_server.RefreshPasswordRsp
9, // 10: crabs.evening_detective_server.EveningDetectiveServer.Login:output_type -> crabs.evening_detective_server.LoginRsp
11, // 11: crabs.evening_detective_server.EveningDetectiveServer.Refresh:output_type -> crabs.evening_detective_server.RefreshRsp
6, // [6:12] is the sub-list for method output_type
0, // [0:6] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_main_proto_init() }
@@ -568,7 +685,7 @@ func file_main_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_main_proto_rawDesc), len(file_main_proto_rawDesc)),
NumEnums: 0,
NumMessages: 10,
NumMessages: 12,
NumExtensions: 0,
NumServices: 1,
},