|
|
@@ -46,6 +46,8 @@ type AccountClient interface {
|
|
|
RandomMeme(ctx context.Context, in *common.RandomNum, opts ...grpc.CallOption) (*common.CommonTextList, error)
|
|
|
// 随机打招呼
|
|
|
RandomSwiftMessage(ctx context.Context, in *common.RandomNumAndSex, opts ...grpc.CallOption) (*common.CommonTextList, error)
|
|
|
+ // 检查文本-百度云
|
|
|
+ CheckText(ctx context.Context, in *CheckTextRequest, opts ...grpc.CallOption) (*CheckTextReply, error)
|
|
|
}
|
|
|
|
|
|
type accountClient struct {
|
|
|
@@ -200,6 +202,15 @@ func (c *accountClient) RandomSwiftMessage(ctx context.Context, in *common.Rando
|
|
|
return out, nil
|
|
|
}
|
|
|
|
|
|
+func (c *accountClient) CheckText(ctx context.Context, in *CheckTextRequest, opts ...grpc.CallOption) (*CheckTextReply, error) {
|
|
|
+ out := new(CheckTextReply)
|
|
|
+ err := c.cc.Invoke(ctx, "/api.account.Account/CheckText", in, out, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
// AccountServer is the server API for Account service.
|
|
|
// All implementations must embed UnimplementedAccountServer
|
|
|
// for forward compatibility
|
|
|
@@ -231,6 +242,8 @@ type AccountServer interface {
|
|
|
RandomMeme(context.Context, *common.RandomNum) (*common.CommonTextList, error)
|
|
|
// 随机打招呼
|
|
|
RandomSwiftMessage(context.Context, *common.RandomNumAndSex) (*common.CommonTextList, error)
|
|
|
+ // 检查文本-百度云
|
|
|
+ CheckText(context.Context, *CheckTextRequest) (*CheckTextReply, error)
|
|
|
mustEmbedUnimplementedAccountServer()
|
|
|
}
|
|
|
|
|
|
@@ -286,6 +299,9 @@ func (UnimplementedAccountServer) RandomMeme(context.Context, *common.RandomNum)
|
|
|
func (UnimplementedAccountServer) RandomSwiftMessage(context.Context, *common.RandomNumAndSex) (*common.CommonTextList, error) {
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method RandomSwiftMessage not implemented")
|
|
|
}
|
|
|
+func (UnimplementedAccountServer) CheckText(context.Context, *CheckTextRequest) (*CheckTextReply, error) {
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method CheckText not implemented")
|
|
|
+}
|
|
|
func (UnimplementedAccountServer) mustEmbedUnimplementedAccountServer() {}
|
|
|
|
|
|
// UnsafeAccountServer may be embedded to opt out of forward compatibility for this service.
|
|
|
@@ -587,6 +603,24 @@ func _Account_RandomSwiftMessage_Handler(srv interface{}, ctx context.Context, d
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
}
|
|
|
|
|
|
+func _Account_CheckText_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(CheckTextRequest)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(AccountServer).CheckText(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/api.account.Account/CheckText",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(AccountServer).CheckText(ctx, req.(*CheckTextRequest))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
// Account_ServiceDesc is the grpc.ServiceDesc for Account service.
|
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
|
// and not to be introspected or modified (even as a copy)
|
|
|
@@ -658,6 +692,10 @@ var Account_ServiceDesc = grpc.ServiceDesc{
|
|
|
MethodName: "RandomSwiftMessage",
|
|
|
Handler: _Account_RandomSwiftMessage_Handler,
|
|
|
},
|
|
|
+ {
|
|
|
+ MethodName: "CheckText",
|
|
|
+ Handler: _Account_CheckText_Handler,
|
|
|
+ },
|
|
|
},
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
Metadata: "account.proto",
|