🐳 add docker file
This commit is contained in:
@@ -20,6 +20,7 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// 人脸识别
|
||||
type FaceRecognitionRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -78,7 +79,7 @@ type FaceRecognitionResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
FaceId int64 `protobuf:"varint,1,opt,name=face_id,json=faceId,proto3" json:"face_id,omitempty"`
|
||||
FaceId int64 `protobuf:"varint,3,opt,name=face_id,json=faceId,proto3" json:"face_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FaceRecognitionResponse) Reset() {
|
||||
@@ -118,6 +119,204 @@ func (x *FaceRecognitionResponse) GetFaceId() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
// tf分类识别
|
||||
type TfClassificationRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Image []byte `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
|
||||
}
|
||||
|
||||
func (x *TfClassificationRequest) Reset() {
|
||||
*x = TfClassificationRequest{}
|
||||
mi := &file_aisvc_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *TfClassificationRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TfClassificationRequest) ProtoMessage() {}
|
||||
|
||||
func (x *TfClassificationRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_aisvc_proto_msgTypes[2]
|
||||
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 TfClassificationRequest.ProtoReflect.Descriptor instead.
|
||||
func (*TfClassificationRequest) Descriptor() ([]byte, []int) {
|
||||
return file_aisvc_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *TfClassificationRequest) GetImage() []byte {
|
||||
if x != nil {
|
||||
return x.Image
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type TfClassificationResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ClassName string `protobuf:"bytes,2,opt,name=class_name,json=className,proto3" json:"class_name,omitempty"`
|
||||
Score float32 `protobuf:"fixed32,3,opt,name=score,proto3" json:"score,omitempty"`
|
||||
}
|
||||
|
||||
func (x *TfClassificationResponse) Reset() {
|
||||
*x = TfClassificationResponse{}
|
||||
mi := &file_aisvc_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *TfClassificationResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TfClassificationResponse) ProtoMessage() {}
|
||||
|
||||
func (x *TfClassificationResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_aisvc_proto_msgTypes[3]
|
||||
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 TfClassificationResponse.ProtoReflect.Descriptor instead.
|
||||
func (*TfClassificationResponse) Descriptor() ([]byte, []int) {
|
||||
return file_aisvc_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *TfClassificationResponse) GetClassName() string {
|
||||
if x != nil {
|
||||
return x.ClassName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *TfClassificationResponse) GetScore() float32 {
|
||||
if x != nil {
|
||||
return x.Score
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// caffe分类识别
|
||||
type CaffeClassificationRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Image []byte `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
|
||||
}
|
||||
|
||||
func (x *CaffeClassificationRequest) Reset() {
|
||||
*x = CaffeClassificationRequest{}
|
||||
mi := &file_aisvc_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CaffeClassificationRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CaffeClassificationRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CaffeClassificationRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_aisvc_proto_msgTypes[4]
|
||||
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 CaffeClassificationRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CaffeClassificationRequest) Descriptor() ([]byte, []int) {
|
||||
return file_aisvc_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *CaffeClassificationRequest) GetImage() []byte {
|
||||
if x != nil {
|
||||
return x.Image
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type CaffeClassificationResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ClassName string `protobuf:"bytes,2,opt,name=class_name,json=className,proto3" json:"class_name,omitempty"`
|
||||
Score float32 `protobuf:"fixed32,3,opt,name=score,proto3" json:"score,omitempty"`
|
||||
}
|
||||
|
||||
func (x *CaffeClassificationResponse) Reset() {
|
||||
*x = CaffeClassificationResponse{}
|
||||
mi := &file_aisvc_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CaffeClassificationResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CaffeClassificationResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CaffeClassificationResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_aisvc_proto_msgTypes[5]
|
||||
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 CaffeClassificationResponse.ProtoReflect.Descriptor instead.
|
||||
func (*CaffeClassificationResponse) Descriptor() ([]byte, []int) {
|
||||
return file_aisvc_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *CaffeClassificationResponse) GetClassName() string {
|
||||
if x != nil {
|
||||
return x.ClassName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CaffeClassificationResponse) GetScore() float32 {
|
||||
if x != nil {
|
||||
return x.Score
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_aisvc_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_aisvc_proto_rawDesc = []byte{
|
||||
@@ -128,15 +327,42 @@ var file_aisvc_proto_rawDesc = []byte{
|
||||
0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x32, 0x0a, 0x17, 0x46, 0x61, 0x63, 0x65,
|
||||
0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x66, 0x61, 0x63, 0x65, 0x49, 0x64, 0x32, 0x57, 0x0a, 0x09,
|
||||
0x41, 0x69, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x46, 0x61, 0x63,
|
||||
0x65, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x2e, 0x61,
|
||||
0x69, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x69, 0x2e, 0x46, 0x61,
|
||||
0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x66, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0x2f, 0x0a, 0x17,
|
||||
0x54, 0x66, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x4f, 0x0a,
|
||||
0x18, 0x54, 0x66, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61,
|
||||
0x73, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63,
|
||||
0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72,
|
||||
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x32,
|
||||
0x0a, 0x1a, 0x43, 0x61, 0x66, 0x66, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x69, 0x6d, 0x61,
|
||||
0x67, 0x65, 0x22, 0x52, 0x0a, 0x1b, 0x43, 0x61, 0x66, 0x66, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73,
|
||||
0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52,
|
||||
0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x32, 0xfe, 0x01, 0x0a, 0x09, 0x41, 0x69, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x46, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f,
|
||||
0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x2e, 0x61, 0x69, 0x2e, 0x46, 0x61, 0x63,
|
||||
0x65, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x69, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63,
|
||||
0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x4d, 0x0a, 0x10, 0x54, 0x66, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x2e, 0x61, 0x69, 0x2e, 0x54, 0x66, 0x43, 0x6c, 0x61, 0x73,
|
||||
0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x69, 0x2e, 0x54, 0x66, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66,
|
||||
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x56, 0x0a, 0x13, 0x43, 0x61, 0x66, 0x66, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69,
|
||||
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x61, 0x69, 0x2e, 0x43, 0x61, 0x66, 0x66,
|
||||
0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x69, 0x2e, 0x43, 0x61, 0x66, 0x66,
|
||||
0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -151,16 +377,24 @@ func file_aisvc_proto_rawDescGZIP() []byte {
|
||||
return file_aisvc_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_aisvc_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_aisvc_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_aisvc_proto_goTypes = []any{
|
||||
(*FaceRecognitionRequest)(nil), // 0: ai.FaceRecognitionRequest
|
||||
(*FaceRecognitionResponse)(nil), // 1: ai.FaceRecognitionResponse
|
||||
(*FaceRecognitionRequest)(nil), // 0: ai.FaceRecognitionRequest
|
||||
(*FaceRecognitionResponse)(nil), // 1: ai.FaceRecognitionResponse
|
||||
(*TfClassificationRequest)(nil), // 2: ai.TfClassificationRequest
|
||||
(*TfClassificationResponse)(nil), // 3: ai.TfClassificationResponse
|
||||
(*CaffeClassificationRequest)(nil), // 4: ai.CaffeClassificationRequest
|
||||
(*CaffeClassificationResponse)(nil), // 5: ai.CaffeClassificationResponse
|
||||
}
|
||||
var file_aisvc_proto_depIdxs = []int32{
|
||||
0, // 0: ai.AiService.FaceRecognition:input_type -> ai.FaceRecognitionRequest
|
||||
1, // 1: ai.AiService.FaceRecognition:output_type -> ai.FaceRecognitionResponse
|
||||
1, // [1:2] is the sub-list for method output_type
|
||||
0, // [0:1] is the sub-list for method input_type
|
||||
2, // 1: ai.AiService.TfClassification:input_type -> ai.TfClassificationRequest
|
||||
4, // 2: ai.AiService.CaffeClassification:input_type -> ai.CaffeClassificationRequest
|
||||
1, // 3: ai.AiService.FaceRecognition:output_type -> ai.FaceRecognitionResponse
|
||||
3, // 4: ai.AiService.TfClassification:output_type -> ai.TfClassificationResponse
|
||||
5, // 5: ai.AiService.CaffeClassification:output_type -> ai.CaffeClassificationResponse
|
||||
3, // [3:6] is the sub-list for method output_type
|
||||
0, // [0:3] 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
|
||||
@@ -177,7 +411,7 @@ func file_aisvc_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_aisvc_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
@@ -19,7 +19,9 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
AiService_FaceRecognition_FullMethodName = "/ai.AiService/FaceRecognition"
|
||||
AiService_FaceRecognition_FullMethodName = "/ai.AiService/FaceRecognition"
|
||||
AiService_TfClassification_FullMethodName = "/ai.AiService/TfClassification"
|
||||
AiService_CaffeClassification_FullMethodName = "/ai.AiService/CaffeClassification"
|
||||
)
|
||||
|
||||
// AiServiceClient is the client API for AiService service.
|
||||
@@ -28,6 +30,10 @@ const (
|
||||
type AiServiceClient interface {
|
||||
// FaceRecognition
|
||||
FaceRecognition(ctx context.Context, in *FaceRecognitionRequest, opts ...grpc.CallOption) (*FaceRecognitionResponse, error)
|
||||
// TfClassification
|
||||
TfClassification(ctx context.Context, in *TfClassificationRequest, opts ...grpc.CallOption) (*TfClassificationResponse, error)
|
||||
// CaffeClassification
|
||||
CaffeClassification(ctx context.Context, in *CaffeClassificationRequest, opts ...grpc.CallOption) (*CaffeClassificationResponse, error)
|
||||
}
|
||||
|
||||
type aiServiceClient struct {
|
||||
@@ -48,12 +54,36 @@ func (c *aiServiceClient) FaceRecognition(ctx context.Context, in *FaceRecogniti
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *aiServiceClient) TfClassification(ctx context.Context, in *TfClassificationRequest, opts ...grpc.CallOption) (*TfClassificationResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(TfClassificationResponse)
|
||||
err := c.cc.Invoke(ctx, AiService_TfClassification_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *aiServiceClient) CaffeClassification(ctx context.Context, in *CaffeClassificationRequest, opts ...grpc.CallOption) (*CaffeClassificationResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CaffeClassificationResponse)
|
||||
err := c.cc.Invoke(ctx, AiService_CaffeClassification_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AiServiceServer is the server API for AiService service.
|
||||
// All implementations must embed UnimplementedAiServiceServer
|
||||
// for forward compatibility.
|
||||
type AiServiceServer interface {
|
||||
// FaceRecognition
|
||||
FaceRecognition(context.Context, *FaceRecognitionRequest) (*FaceRecognitionResponse, error)
|
||||
// TfClassification
|
||||
TfClassification(context.Context, *TfClassificationRequest) (*TfClassificationResponse, error)
|
||||
// CaffeClassification
|
||||
CaffeClassification(context.Context, *CaffeClassificationRequest) (*CaffeClassificationResponse, error)
|
||||
mustEmbedUnimplementedAiServiceServer()
|
||||
}
|
||||
|
||||
@@ -67,6 +97,12 @@ type UnimplementedAiServiceServer struct{}
|
||||
func (UnimplementedAiServiceServer) FaceRecognition(context.Context, *FaceRecognitionRequest) (*FaceRecognitionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FaceRecognition not implemented")
|
||||
}
|
||||
func (UnimplementedAiServiceServer) TfClassification(context.Context, *TfClassificationRequest) (*TfClassificationResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method TfClassification not implemented")
|
||||
}
|
||||
func (UnimplementedAiServiceServer) CaffeClassification(context.Context, *CaffeClassificationRequest) (*CaffeClassificationResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CaffeClassification not implemented")
|
||||
}
|
||||
func (UnimplementedAiServiceServer) mustEmbedUnimplementedAiServiceServer() {}
|
||||
func (UnimplementedAiServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
@@ -106,6 +142,42 @@ func _AiService_FaceRecognition_Handler(srv interface{}, ctx context.Context, de
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AiService_TfClassification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(TfClassificationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AiServiceServer).TfClassification(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AiService_TfClassification_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AiServiceServer).TfClassification(ctx, req.(*TfClassificationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AiService_CaffeClassification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CaffeClassificationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AiServiceServer).CaffeClassification(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AiService_CaffeClassification_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AiServiceServer).CaffeClassification(ctx, req.(*CaffeClassificationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// AiService_ServiceDesc is the grpc.ServiceDesc for AiService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@@ -117,6 +189,14 @@ var AiService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "FaceRecognition",
|
||||
Handler: _AiService_FaceRecognition_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "TfClassification",
|
||||
Handler: _AiService_TfClassification_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CaffeClassification",
|
||||
Handler: _AiService_CaffeClassification_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "aisvc.proto",
|
||||
|
Reference in New Issue
Block a user