From 913ed608de8b0564242d490e8caa5735a8849c11 Mon Sep 17 00:00:00 2001 From: FDKevin Date: Mon, 26 Aug 2024 19:21:31 +0000 Subject: [PATCH] ci(gen): buf generate up to date --- campusapis/skl/v1/skl.pb.go | 163 ++++++------------ campusapis/skl/v1/skl.pb.gw.go | 45 +---- campusapis/skl/v1/skl_grpc.pb.go | 13 +- .../campusapis/skl/v1/skl.swagger.json | 18 -- 4 files changed, 63 insertions(+), 176 deletions(-) diff --git a/campusapis/skl/v1/skl.pb.go b/campusapis/skl/v1/skl.pb.go index 0a10d98..59adbf2 100644 --- a/campusapis/skl/v1/skl.pb.go +++ b/campusapis/skl/v1/skl.pb.go @@ -10,6 +10,7 @@ import ( _ "google.golang.org/genproto/googleapis/api/annotations" 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" ) @@ -101,53 +102,6 @@ func (x *SklUnitInfo) GetClassNos() []string { return nil } -type StaffUnitInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - StaffId string `protobuf:"bytes,1,opt,name=StaffId,proto3" json:"StaffId,omitempty"` // 学/工号 -} - -func (x *StaffUnitInfoRequest) Reset() { - *x = StaffUnitInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_campusapis_skl_v1_skl_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StaffUnitInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StaffUnitInfoRequest) ProtoMessage() {} - -func (x *StaffUnitInfoRequest) ProtoReflect() protoreflect.Message { - mi := &file_campusapis_skl_v1_skl_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StaffUnitInfoRequest.ProtoReflect.Descriptor instead. -func (*StaffUnitInfoRequest) Descriptor() ([]byte, []int) { - return file_campusapis_skl_v1_skl_proto_rawDescGZIP(), []int{1} -} - -func (x *StaffUnitInfoRequest) GetStaffId() string { - if x != nil { - return x.StaffId - } - return "" -} - type StaffUnitInfoResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -161,7 +115,7 @@ type StaffUnitInfoResponse struct { func (x *StaffUnitInfoResponse) Reset() { *x = StaffUnitInfoResponse{} if protoimpl.UnsafeEnabled { - mi := &file_campusapis_skl_v1_skl_proto_msgTypes[2] + mi := &file_campusapis_skl_v1_skl_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -174,7 +128,7 @@ func (x *StaffUnitInfoResponse) String() string { func (*StaffUnitInfoResponse) ProtoMessage() {} func (x *StaffUnitInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_campusapis_skl_v1_skl_proto_msgTypes[2] + mi := &file_campusapis_skl_v1_skl_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -187,7 +141,7 @@ func (x *StaffUnitInfoResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StaffUnitInfoResponse.ProtoReflect.Descriptor instead. func (*StaffUnitInfoResponse) Descriptor() ([]byte, []int) { - return file_campusapis_skl_v1_skl_proto_rawDescGZIP(), []int{2} + return file_campusapis_skl_v1_skl_proto_rawDescGZIP(), []int{1} } func (x *StaffUnitInfoResponse) GetError() int32 { @@ -218,50 +172,47 @@ var file_campusapis_skl_v1_skl_proto_rawDesc = []byte{ 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x6b, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x63, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x73, 0x6b, 0x6c, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, - 0x01, 0x0a, 0x0b, 0x53, 0x6b, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, - 0x0a, 0x06, 0x75, 0x6e, 0x69, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x75, 0x6e, 0x69, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x69, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x6e, 0x69, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x61, 0x63, - 0x68, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x61, 0x63, - 0x68, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x6f, 0x73, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x6f, 0x73, - 0x22, 0x30, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x66, 0x66, 0x55, 0x6e, 0x69, 0x74, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x66, - 0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x53, 0x74, 0x61, 0x66, 0x66, - 0x49, 0x64, 0x22, 0x73, 0x0a, 0x15, 0x53, 0x74, 0x61, 0x66, 0x66, 0x55, 0x6e, 0x69, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6d, 0x73, 0x67, 0x12, 0x32, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x73, - 0x6b, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6b, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0x9f, 0x01, 0x0a, 0x0a, 0x53, 0x6b, 0x6c, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x90, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x74, - 0x61, 0x66, 0x66, 0x55, 0x6e, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x27, 0x2e, 0x63, 0x61, - 0x6d, 0x70, 0x75, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x73, 0x6b, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x74, 0x61, 0x66, 0x66, 0x55, 0x6e, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x61, 0x70, 0x69, - 0x73, 0x2e, 0x73, 0x6b, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x66, 0x66, 0x55, 0x6e, - 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x5a, 0x12, 0x12, 0x10, 0x2f, 0x73, 0x6b, 0x6c, 0x2f, 0x76, - 0x31, 0x2f, 0x75, 0x6e, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0d, 0x2f, 0x73, 0x6b, 0x6c, - 0x2f, 0x75, 0x6e, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0xc0, 0x01, 0x0a, 0x15, 0x63, 0x6f, - 0x6d, 0x2e, 0x63, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x73, 0x6b, 0x6c, - 0x2e, 0x76, 0x31, 0x42, 0x08, 0x53, 0x6b, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x64, 0x75, 0x68, - 0x65, 0x6c, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x73, 0x64, 0x6b, - 0x2f, 0x63, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x73, 0x6b, 0x6c, 0x2f, - 0x76, 0x31, 0x3b, 0x73, 0x6b, 0x6c, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x58, 0xaa, 0x02, - 0x11, 0x43, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x53, 0x6b, 0x6c, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x11, 0x43, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x61, 0x70, 0x69, 0x73, 0x5c, - 0x53, 0x6b, 0x6c, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x43, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x61, - 0x70, 0x69, 0x73, 0x5c, 0x53, 0x6b, 0x6c, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x43, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x61, - 0x70, 0x69, 0x73, 0x3a, 0x3a, 0x53, 0x6b, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 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, 0x8f, 0x01, 0x0a, 0x0b, + 0x53, 0x6b, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x75, + 0x6e, 0x69, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x6e, 0x69, + 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x69, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x6e, 0x69, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, + 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x6f, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x6f, 0x73, 0x22, 0x73, 0x0a, + 0x15, 0x53, 0x74, 0x61, 0x66, 0x66, 0x55, 0x6e, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x10, 0x0a, 0x03, + 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x32, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, + 0x61, 0x6d, 0x70, 0x75, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x73, 0x6b, 0x6c, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x6b, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x32, 0x8d, 0x01, 0x0a, 0x0a, 0x53, 0x6b, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x7f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x66, 0x66, 0x55, 0x6e, 0x69, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 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, 0x28, 0x2e, + 0x63, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x73, 0x6b, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x61, 0x66, 0x66, 0x55, 0x6e, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x5a, + 0x12, 0x12, 0x10, 0x2f, 0x73, 0x6b, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x6e, 0x69, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x0d, 0x2f, 0x73, 0x6b, 0x6c, 0x2f, 0x75, 0x6e, 0x69, 0x74, 0x49, 0x6e, + 0x66, 0x6f, 0x42, 0xc0, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x61, 0x6d, 0x70, 0x75, + 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x73, 0x6b, 0x6c, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x53, 0x6b, + 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x64, 0x75, 0x68, 0x65, 0x6c, 0x70, 0x2f, 0x61, 0x70, 0x69, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x73, 0x64, 0x6b, 0x2f, 0x63, 0x61, 0x6d, 0x70, 0x75, 0x73, + 0x61, 0x70, 0x69, 0x73, 0x2f, 0x73, 0x6b, 0x6c, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x6b, 0x6c, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x58, 0xaa, 0x02, 0x11, 0x43, 0x61, 0x6d, 0x70, 0x75, 0x73, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x53, 0x6b, 0x6c, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x43, 0x61, + 0x6d, 0x70, 0x75, 0x73, 0x61, 0x70, 0x69, 0x73, 0x5c, 0x53, 0x6b, 0x6c, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x1d, 0x43, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x61, 0x70, 0x69, 0x73, 0x5c, 0x53, 0x6b, 0x6c, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x13, 0x43, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x61, 0x70, 0x69, 0x73, 0x3a, 0x3a, 0x53, 0x6b, + 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -276,16 +227,16 @@ func file_campusapis_skl_v1_skl_proto_rawDescGZIP() []byte { return file_campusapis_skl_v1_skl_proto_rawDescData } -var file_campusapis_skl_v1_skl_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_campusapis_skl_v1_skl_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_campusapis_skl_v1_skl_proto_goTypes = []interface{}{ (*SklUnitInfo)(nil), // 0: campusapis.skl.v1.SklUnitInfo - (*StaffUnitInfoRequest)(nil), // 1: campusapis.skl.v1.StaffUnitInfoRequest - (*StaffUnitInfoResponse)(nil), // 2: campusapis.skl.v1.StaffUnitInfoResponse + (*StaffUnitInfoResponse)(nil), // 1: campusapis.skl.v1.StaffUnitInfoResponse + (*emptypb.Empty)(nil), // 2: google.protobuf.Empty } var file_campusapis_skl_v1_skl_proto_depIdxs = []int32{ 0, // 0: campusapis.skl.v1.StaffUnitInfoResponse.data:type_name -> campusapis.skl.v1.SklUnitInfo - 1, // 1: campusapis.skl.v1.SklService.GetStaffUnitInfo:input_type -> campusapis.skl.v1.StaffUnitInfoRequest - 2, // 2: campusapis.skl.v1.SklService.GetStaffUnitInfo:output_type -> campusapis.skl.v1.StaffUnitInfoResponse + 2, // 1: campusapis.skl.v1.SklService.GetStaffUnitInfo:input_type -> google.protobuf.Empty + 1, // 2: campusapis.skl.v1.SklService.GetStaffUnitInfo:output_type -> campusapis.skl.v1.StaffUnitInfoResponse 2, // [2:3] is the sub-list for method output_type 1, // [1:2] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -312,18 +263,6 @@ func file_campusapis_skl_v1_skl_proto_init() { } } file_campusapis_skl_v1_skl_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StaffUnitInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_campusapis_skl_v1_skl_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StaffUnitInfoResponse); i { case 0: return &v.state @@ -342,7 +281,7 @@ func file_campusapis_skl_v1_skl_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_campusapis_skl_v1_skl_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 2, NumExtensions: 0, NumServices: 1, }, diff --git a/campusapis/skl/v1/skl.pb.gw.go b/campusapis/skl/v1/skl.pb.gw.go index efd5c4f..44ac770 100644 --- a/campusapis/skl/v1/skl.pb.gw.go +++ b/campusapis/skl/v1/skl.pb.gw.go @@ -21,6 +21,7 @@ import ( "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/emptypb" ) // Suppress "imported and not used" errors @@ -31,73 +32,37 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = metadata.Join -var ( - filter_SklService_GetStaffUnitInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - func request_SklService_GetStaffUnitInfo_0(ctx context.Context, marshaler runtime.Marshaler, client SklServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq StaffUnitInfoRequest + var protoReq emptypb.Empty var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SklService_GetStaffUnitInfo_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.GetStaffUnitInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_SklService_GetStaffUnitInfo_0(ctx context.Context, marshaler runtime.Marshaler, server SklServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq StaffUnitInfoRequest + var protoReq emptypb.Empty var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SklService_GetStaffUnitInfo_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.GetStaffUnitInfo(ctx, &protoReq) return msg, metadata, err } -var ( - filter_SklService_GetStaffUnitInfo_1 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - func request_SklService_GetStaffUnitInfo_1(ctx context.Context, marshaler runtime.Marshaler, client SklServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq StaffUnitInfoRequest + var protoReq emptypb.Empty var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SklService_GetStaffUnitInfo_1); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.GetStaffUnitInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_SklService_GetStaffUnitInfo_1(ctx context.Context, marshaler runtime.Marshaler, server SklServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq StaffUnitInfoRequest + var protoReq emptypb.Empty var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SklService_GetStaffUnitInfo_1); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.GetStaffUnitInfo(ctx, &protoReq) return msg, metadata, err diff --git a/campusapis/skl/v1/skl_grpc.pb.go b/campusapis/skl/v1/skl_grpc.pb.go index c472ab1..5a15dd0 100644 --- a/campusapis/skl/v1/skl_grpc.pb.go +++ b/campusapis/skl/v1/skl_grpc.pb.go @@ -11,6 +11,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 @@ -27,7 +28,7 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type SklServiceClient interface { // 获取某学院某年级的学生信息 - GetStaffUnitInfo(ctx context.Context, in *StaffUnitInfoRequest, opts ...grpc.CallOption) (*StaffUnitInfoResponse, error) + GetStaffUnitInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*StaffUnitInfoResponse, error) } type sklServiceClient struct { @@ -38,7 +39,7 @@ func NewSklServiceClient(cc grpc.ClientConnInterface) SklServiceClient { return &sklServiceClient{cc} } -func (c *sklServiceClient) GetStaffUnitInfo(ctx context.Context, in *StaffUnitInfoRequest, opts ...grpc.CallOption) (*StaffUnitInfoResponse, error) { +func (c *sklServiceClient) GetStaffUnitInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*StaffUnitInfoResponse, error) { out := new(StaffUnitInfoResponse) err := c.cc.Invoke(ctx, SklService_GetStaffUnitInfo_FullMethodName, in, out, opts...) if err != nil { @@ -52,7 +53,7 @@ func (c *sklServiceClient) GetStaffUnitInfo(ctx context.Context, in *StaffUnitIn // for forward compatibility type SklServiceServer interface { // 获取某学院某年级的学生信息 - GetStaffUnitInfo(context.Context, *StaffUnitInfoRequest) (*StaffUnitInfoResponse, error) + GetStaffUnitInfo(context.Context, *emptypb.Empty) (*StaffUnitInfoResponse, error) mustEmbedUnimplementedSklServiceServer() } @@ -60,7 +61,7 @@ type SklServiceServer interface { type UnimplementedSklServiceServer struct { } -func (UnimplementedSklServiceServer) GetStaffUnitInfo(context.Context, *StaffUnitInfoRequest) (*StaffUnitInfoResponse, error) { +func (UnimplementedSklServiceServer) GetStaffUnitInfo(context.Context, *emptypb.Empty) (*StaffUnitInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetStaffUnitInfo not implemented") } func (UnimplementedSklServiceServer) mustEmbedUnimplementedSklServiceServer() {} @@ -77,7 +78,7 @@ func RegisterSklServiceServer(s grpc.ServiceRegistrar, srv SklServiceServer) { } func _SklService_GetStaffUnitInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StaffUnitInfoRequest) + in := new(emptypb.Empty) if err := dec(in); err != nil { return nil, err } @@ -89,7 +90,7 @@ func _SklService_GetStaffUnitInfo_Handler(srv interface{}, ctx context.Context, FullMethod: SklService_GetStaffUnitInfo_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SklServiceServer).GetStaffUnitInfo(ctx, req.(*StaffUnitInfoRequest)) + return srv.(SklServiceServer).GetStaffUnitInfo(ctx, req.(*emptypb.Empty)) } return interceptor(ctx, in, info, handler) } diff --git a/docs/swagger/campusapis/skl/v1/skl.swagger.json b/docs/swagger/campusapis/skl/v1/skl.swagger.json index 8b7587a..7e206c6 100644 --- a/docs/swagger/campusapis/skl/v1/skl.swagger.json +++ b/docs/swagger/campusapis/skl/v1/skl.swagger.json @@ -34,15 +34,6 @@ } } }, - "parameters": [ - { - "name": "StaffId", - "description": "学/工号", - "in": "query", - "required": false, - "type": "string" - } - ], "tags": [ "SklService" ] @@ -66,15 +57,6 @@ } } }, - "parameters": [ - { - "name": "StaffId", - "description": "学/工号", - "in": "query", - "required": false, - "type": "string" - } - ], "tags": [ "SklService" ]