wfz 2 лет назад
Родитель
Сommit
7df737cb82
3 измененных файлов с 87 добавлено и 38 удалено
  1. 48 37
      api/check/check.pb.go
  2. 2 1
      api/check/check.proto
  3. 37 0
      api/check/check_grpc.pb.go

+ 48 - 37
api/check/check.pb.go

@@ -9,6 +9,7 @@ package check
 import (
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	emptypb "google.golang.org/protobuf/types/known/emptypb"
 	reflect "reflect"
 	sync "sync"
 )
@@ -150,36 +151,43 @@ var File_check_proto protoreflect.FileDescriptor
 
 var file_check_proto_rawDesc = []byte{
 	0x0a, 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x61,
-	0x70, 0x69, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x22, 0x92, 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x65,
-	0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e,
-	0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74,
-	0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x70, 0x65,
-	0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x70, 0x65, 0x6e, 0x49,
-	0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x73, 0x4d, 0x69, 0x6e,
-	0x69, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d,
-	0x69, 0x73, 0x4d, 0x69, 0x6e, 0x69, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x22, 0x28, 0x0a,
-	0x0a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x69,
-	0x73, 0x55, 0x6e, 0x50, 0x61, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69,
-	0x73, 0x55, 0x6e, 0x50, 0x61, 0x73, 0x73, 0x32, 0xc8, 0x01, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63,
-	0x6b, 0x12, 0x3d, 0x0a, 0x09, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x65, 0x78, 0x74, 0x12, 0x17,
-	0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b,
-	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68,
-	0x65, 0x63, 0x6b, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00,
-	0x12, 0x40, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65,
-	0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x68, 0x65,
-	0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e,
-	0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79,
-	0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x56, 0x6f, 0x69, 0x63, 0x65,
-	0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x68, 0x65,
-	0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e,
-	0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79,
-	0x22, 0x00, 0x42, 0x40, 0x0a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x50,
-	0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x2e, 0x69, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x63, 0x6f,
-	0x6d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x77, 0x2d, 0x70, 0x72, 0x6f, 0x74,
-	0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x3b, 0x63,
-	0x68, 0x65, 0x63, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x70, 0x69, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+	0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e,
+	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x92, 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52,
+	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
+	0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
+	0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x70, 0x65, 0x6e, 0x49, 0x64,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x70, 0x65, 0x6e, 0x49, 0x64, 0x12, 0x14,
+	0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61,
+	0x70, 0x70, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x73, 0x4d, 0x69, 0x6e, 0x69, 0x50, 0x72,
+	0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x4d,
+	0x69, 0x6e, 0x69, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x22, 0x28, 0x0a, 0x0a, 0x43, 0x68,
+	0x65, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x55, 0x6e,
+	0x50, 0x61, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x55, 0x6e,
+	0x50, 0x61, 0x73, 0x73, 0x32, 0x93, 0x02, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x3d,
+	0x0a, 0x09, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x65, 0x78, 0x74, 0x12, 0x17, 0x2e, 0x61, 0x70,
+	0x69, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71,
+	0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b,
+	0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x40, 0x0a,
+	0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x17, 0x2e,
+	0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52,
+	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x65,
+	0x63, 0x6b, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12,
+	0x3e, 0x0a, 0x0a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x17, 0x2e,
+	0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52,
+	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x65,
+	0x63, 0x6b, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12,
+	0x49, 0x0a, 0x15, 0x43, 0x72, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x42, 0x61,
+	0x69, 0x64, 0x75, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+	0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
+	0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+	0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0x40, 0x0a, 0x09, 0x61, 0x70,
+	0x69, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x2e, 0x69,
+	0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
+	0x2f, 0x70, 0x77, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x70, 0x69,
+	0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x3b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x62, 0x06, 0x70, 0x72,
+	0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -196,18 +204,21 @@ func file_check_proto_rawDescGZIP() []byte {
 
 var file_check_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
 var file_check_proto_goTypes = []interface{}{
-	(*CheckRequest)(nil), // 0: api.check.CheckRequest
-	(*CheckReply)(nil),   // 1: api.check.CheckReply
+	(*CheckRequest)(nil),  // 0: api.check.CheckRequest
+	(*CheckReply)(nil),    // 1: api.check.CheckReply
+	(*emptypb.Empty)(nil), // 2: google.protobuf.Empty
 }
 var file_check_proto_depIdxs = []int32{
 	0, // 0: api.check.Check.CheckText:input_type -> api.check.CheckRequest
 	0, // 1: api.check.Check.CheckPicture:input_type -> api.check.CheckRequest
 	0, // 2: api.check.Check.CheckVoice:input_type -> api.check.CheckRequest
-	1, // 3: api.check.Check.CheckText:output_type -> api.check.CheckReply
-	1, // 4: api.check.Check.CheckPicture:output_type -> api.check.CheckReply
-	1, // 5: api.check.Check.CheckVoice:output_type -> api.check.CheckReply
-	3, // [3:6] is the sub-list for method output_type
-	0, // [0:3] is the sub-list for method input_type
+	2, // 3: api.check.Check.CronRefreshBaiduToken:input_type -> google.protobuf.Empty
+	1, // 4: api.check.Check.CheckText:output_type -> api.check.CheckReply
+	1, // 5: api.check.Check.CheckPicture:output_type -> api.check.CheckReply
+	1, // 6: api.check.Check.CheckVoice:output_type -> api.check.CheckReply
+	2, // 7: api.check.Check.CronRefreshBaiduToken:output_type -> google.protobuf.Empty
+	4, // [4:8] is the sub-list for method output_type
+	0, // [0:4] 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

+ 2 - 1
api/check/check.proto

@@ -4,7 +4,7 @@ package api.check;
 
 //import "google/api/annotations.proto";
 //import "google/protobuf/struct.proto";
-//import "google/protobuf/empty.proto";
+import "google/protobuf/empty.proto";
 
 option go_package = "git.ikuban.com/server/pw-protobuf/api/check;check";
 option java_multiple_files = true;
@@ -14,6 +14,7 @@ service Check {
   rpc CheckText (CheckRequest) returns (CheckReply){};
   rpc CheckPicture (CheckRequest) returns (CheckReply){};
   rpc CheckVoice (CheckRequest) returns (CheckReply){};
+  rpc CronRefreshBaiduToken (google.protobuf.Empty) returns (google.protobuf.Empty){};
 }
 
 

+ 37 - 0
api/check/check_grpc.pb.go

@@ -7,6 +7,7 @@ import (
 	grpc "google.golang.org/grpc"
 	codes "google.golang.org/grpc/codes"
 	status "google.golang.org/grpc/status"
+	emptypb "google.golang.org/protobuf/types/known/emptypb"
 )
 
 // This is a compile-time assertion to ensure that this generated file
@@ -21,6 +22,7 @@ type CheckClient interface {
 	CheckText(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckReply, error)
 	CheckPicture(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckReply, error)
 	CheckVoice(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckReply, error)
+	CronRefreshBaiduToken(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
 }
 
 type checkClient struct {
@@ -58,6 +60,15 @@ func (c *checkClient) CheckVoice(ctx context.Context, in *CheckRequest, opts ...
 	return out, nil
 }
 
+func (c *checkClient) CronRefreshBaiduToken(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	out := new(emptypb.Empty)
+	err := c.cc.Invoke(ctx, "/api.check.Check/CronRefreshBaiduToken", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // CheckServer is the server API for Check service.
 // All implementations must embed UnimplementedCheckServer
 // for forward compatibility
@@ -65,6 +76,7 @@ type CheckServer interface {
 	CheckText(context.Context, *CheckRequest) (*CheckReply, error)
 	CheckPicture(context.Context, *CheckRequest) (*CheckReply, error)
 	CheckVoice(context.Context, *CheckRequest) (*CheckReply, error)
+	CronRefreshBaiduToken(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
 	mustEmbedUnimplementedCheckServer()
 }
 
@@ -81,6 +93,9 @@ func (UnimplementedCheckServer) CheckPicture(context.Context, *CheckRequest) (*C
 func (UnimplementedCheckServer) CheckVoice(context.Context, *CheckRequest) (*CheckReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method CheckVoice not implemented")
 }
+func (UnimplementedCheckServer) CronRefreshBaiduToken(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CronRefreshBaiduToken not implemented")
+}
 func (UnimplementedCheckServer) mustEmbedUnimplementedCheckServer() {}
 
 // UnsafeCheckServer may be embedded to opt out of forward compatibility for this service.
@@ -148,6 +163,24 @@ func _Check_CheckVoice_Handler(srv interface{}, ctx context.Context, dec func(in
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Check_CronRefreshBaiduToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(emptypb.Empty)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(CheckServer).CronRefreshBaiduToken(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.check.Check/CronRefreshBaiduToken",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(CheckServer).CronRefreshBaiduToken(ctx, req.(*emptypb.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // Check_ServiceDesc is the grpc.ServiceDesc for Check service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -167,6 +200,10 @@ var Check_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "CheckVoice",
 			Handler:    _Check_CheckVoice_Handler,
 		},
+		{
+			MethodName: "CronRefreshBaiduToken",
+			Handler:    _Check_CronRefreshBaiduToken_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "check.proto",