532 lines
22 KiB
Go
532 lines
22 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.5.1
|
|
// - protoc v3.21.12
|
|
// source: customer/v1/customer.proto
|
|
|
|
package v1
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
CustomerService_SystemStatus_FullMethodName = "/api.customer.v1.CustomerService/SystemStatus"
|
|
CustomerService_Chat_FullMethodName = "/api.customer.v1.CustomerService/Chat"
|
|
CustomerService_GetSessions_FullMethodName = "/api.customer.v1.CustomerService/GetSessions"
|
|
CustomerService_CreateSession_FullMethodName = "/api.customer.v1.CustomerService/CreateSession"
|
|
CustomerService_UploadKnowledge_FullMethodName = "/api.customer.v1.CustomerService/UploadKnowledge"
|
|
CustomerService_ListKnowledge_FullMethodName = "/api.customer.v1.CustomerService/ListKnowledge"
|
|
CustomerService_DeleteKnowledge_FullMethodName = "/api.customer.v1.CustomerService/DeleteKnowledge"
|
|
CustomerService_SearchKnowledge_FullMethodName = "/api.customer.v1.CustomerService/SearchKnowledge"
|
|
CustomerService_GetKnowledgeSummary_FullMethodName = "/api.customer.v1.CustomerService/GetKnowledgeSummary"
|
|
CustomerService_QueryOrder_FullMethodName = "/api.customer.v1.CustomerService/QueryOrder"
|
|
CustomerService_StreamChat_FullMethodName = "/api.customer.v1.CustomerService/StreamChat"
|
|
)
|
|
|
|
// CustomerServiceClient is the client API for CustomerService service.
|
|
//
|
|
// 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 CustomerServiceClient interface {
|
|
// 健康检查接口
|
|
SystemStatus(ctx context.Context, in *SystemStatusRequest, opts ...grpc.CallOption) (*SystemStatusResponse, error)
|
|
// 聊天消息处理接口
|
|
Chat(ctx context.Context, in *ChatRequest, opts ...grpc.CallOption) (*ChatResponse, error)
|
|
// 获取会话列表接口
|
|
GetSessions(ctx context.Context, in *GetSessionsRequest, opts ...grpc.CallOption) (*GetSessionsResponse, error)
|
|
// 创建新会话接口
|
|
CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*CreateSessionResponse, error)
|
|
// 知识库文档上传接口
|
|
UploadKnowledge(ctx context.Context, in *UploadKnowledgeRequest, opts ...grpc.CallOption) (*UploadKnowledgeResponse, error)
|
|
// 获取知识库文档列表接口
|
|
ListKnowledge(ctx context.Context, in *ListKnowledgeRequest, opts ...grpc.CallOption) (*ListKnowledgeResponse, error)
|
|
// 删除知识库文档接口
|
|
DeleteKnowledge(ctx context.Context, in *DeleteKnowledgeRequest, opts ...grpc.CallOption) (*DeleteKnowledgeResponse, error)
|
|
// 搜索知识库接口
|
|
SearchKnowledge(ctx context.Context, in *SearchKnowledgeRequest, opts ...grpc.CallOption) (*SearchKnowledgeResponse, error)
|
|
// 获取知识库摘要接口
|
|
GetKnowledgeSummary(ctx context.Context, in *GetKnowledgeSummaryRequest, opts ...grpc.CallOption) (*GetKnowledgeSummaryResponse, error)
|
|
// 订单查询接口
|
|
QueryOrder(ctx context.Context, in *QueryOrderRequest, opts ...grpc.CallOption) (*QueryOrderResponse, error)
|
|
// 流式聊天接口 (通过HTTP SSE实现)
|
|
StreamChat(ctx context.Context, in *StreamChatRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamChatResponse], error)
|
|
}
|
|
|
|
type customerServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewCustomerServiceClient(cc grpc.ClientConnInterface) CustomerServiceClient {
|
|
return &customerServiceClient{cc}
|
|
}
|
|
|
|
func (c *customerServiceClient) SystemStatus(ctx context.Context, in *SystemStatusRequest, opts ...grpc.CallOption) (*SystemStatusResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SystemStatusResponse)
|
|
err := c.cc.Invoke(ctx, CustomerService_SystemStatus_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *customerServiceClient) Chat(ctx context.Context, in *ChatRequest, opts ...grpc.CallOption) (*ChatResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ChatResponse)
|
|
err := c.cc.Invoke(ctx, CustomerService_Chat_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *customerServiceClient) GetSessions(ctx context.Context, in *GetSessionsRequest, opts ...grpc.CallOption) (*GetSessionsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetSessionsResponse)
|
|
err := c.cc.Invoke(ctx, CustomerService_GetSessions_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *customerServiceClient) CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*CreateSessionResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CreateSessionResponse)
|
|
err := c.cc.Invoke(ctx, CustomerService_CreateSession_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *customerServiceClient) UploadKnowledge(ctx context.Context, in *UploadKnowledgeRequest, opts ...grpc.CallOption) (*UploadKnowledgeResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(UploadKnowledgeResponse)
|
|
err := c.cc.Invoke(ctx, CustomerService_UploadKnowledge_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *customerServiceClient) ListKnowledge(ctx context.Context, in *ListKnowledgeRequest, opts ...grpc.CallOption) (*ListKnowledgeResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListKnowledgeResponse)
|
|
err := c.cc.Invoke(ctx, CustomerService_ListKnowledge_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *customerServiceClient) DeleteKnowledge(ctx context.Context, in *DeleteKnowledgeRequest, opts ...grpc.CallOption) (*DeleteKnowledgeResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(DeleteKnowledgeResponse)
|
|
err := c.cc.Invoke(ctx, CustomerService_DeleteKnowledge_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *customerServiceClient) SearchKnowledge(ctx context.Context, in *SearchKnowledgeRequest, opts ...grpc.CallOption) (*SearchKnowledgeResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SearchKnowledgeResponse)
|
|
err := c.cc.Invoke(ctx, CustomerService_SearchKnowledge_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *customerServiceClient) GetKnowledgeSummary(ctx context.Context, in *GetKnowledgeSummaryRequest, opts ...grpc.CallOption) (*GetKnowledgeSummaryResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetKnowledgeSummaryResponse)
|
|
err := c.cc.Invoke(ctx, CustomerService_GetKnowledgeSummary_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *customerServiceClient) QueryOrder(ctx context.Context, in *QueryOrderRequest, opts ...grpc.CallOption) (*QueryOrderResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(QueryOrderResponse)
|
|
err := c.cc.Invoke(ctx, CustomerService_QueryOrder_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *customerServiceClient) StreamChat(ctx context.Context, in *StreamChatRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamChatResponse], error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
stream, err := c.cc.NewStream(ctx, &CustomerService_ServiceDesc.Streams[0], CustomerService_StreamChat_FullMethodName, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &grpc.GenericClientStream[StreamChatRequest, StreamChatResponse]{ClientStream: stream}
|
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if err := x.ClientStream.CloseSend(); err != nil {
|
|
return nil, err
|
|
}
|
|
return x, nil
|
|
}
|
|
|
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
|
type CustomerService_StreamChatClient = grpc.ServerStreamingClient[StreamChatResponse]
|
|
|
|
// CustomerServiceServer is the server API for CustomerService service.
|
|
// All implementations must embed UnimplementedCustomerServiceServer
|
|
// for forward compatibility.
|
|
//
|
|
// 智能客服服务定义
|
|
type CustomerServiceServer interface {
|
|
// 健康检查接口
|
|
SystemStatus(context.Context, *SystemStatusRequest) (*SystemStatusResponse, error)
|
|
// 聊天消息处理接口
|
|
Chat(context.Context, *ChatRequest) (*ChatResponse, error)
|
|
// 获取会话列表接口
|
|
GetSessions(context.Context, *GetSessionsRequest) (*GetSessionsResponse, error)
|
|
// 创建新会话接口
|
|
CreateSession(context.Context, *CreateSessionRequest) (*CreateSessionResponse, error)
|
|
// 知识库文档上传接口
|
|
UploadKnowledge(context.Context, *UploadKnowledgeRequest) (*UploadKnowledgeResponse, error)
|
|
// 获取知识库文档列表接口
|
|
ListKnowledge(context.Context, *ListKnowledgeRequest) (*ListKnowledgeResponse, error)
|
|
// 删除知识库文档接口
|
|
DeleteKnowledge(context.Context, *DeleteKnowledgeRequest) (*DeleteKnowledgeResponse, error)
|
|
// 搜索知识库接口
|
|
SearchKnowledge(context.Context, *SearchKnowledgeRequest) (*SearchKnowledgeResponse, error)
|
|
// 获取知识库摘要接口
|
|
GetKnowledgeSummary(context.Context, *GetKnowledgeSummaryRequest) (*GetKnowledgeSummaryResponse, error)
|
|
// 订单查询接口
|
|
QueryOrder(context.Context, *QueryOrderRequest) (*QueryOrderResponse, error)
|
|
// 流式聊天接口 (通过HTTP SSE实现)
|
|
StreamChat(*StreamChatRequest, grpc.ServerStreamingServer[StreamChatResponse]) error
|
|
mustEmbedUnimplementedCustomerServiceServer()
|
|
}
|
|
|
|
// UnimplementedCustomerServiceServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedCustomerServiceServer struct{}
|
|
|
|
func (UnimplementedCustomerServiceServer) SystemStatus(context.Context, *SystemStatusRequest) (*SystemStatusResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method SystemStatus not implemented")
|
|
}
|
|
func (UnimplementedCustomerServiceServer) Chat(context.Context, *ChatRequest) (*ChatResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Chat not implemented")
|
|
}
|
|
func (UnimplementedCustomerServiceServer) GetSessions(context.Context, *GetSessionsRequest) (*GetSessionsResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetSessions not implemented")
|
|
}
|
|
func (UnimplementedCustomerServiceServer) CreateSession(context.Context, *CreateSessionRequest) (*CreateSessionResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CreateSession not implemented")
|
|
}
|
|
func (UnimplementedCustomerServiceServer) UploadKnowledge(context.Context, *UploadKnowledgeRequest) (*UploadKnowledgeResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UploadKnowledge not implemented")
|
|
}
|
|
func (UnimplementedCustomerServiceServer) ListKnowledge(context.Context, *ListKnowledgeRequest) (*ListKnowledgeResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListKnowledge not implemented")
|
|
}
|
|
func (UnimplementedCustomerServiceServer) DeleteKnowledge(context.Context, *DeleteKnowledgeRequest) (*DeleteKnowledgeResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteKnowledge not implemented")
|
|
}
|
|
func (UnimplementedCustomerServiceServer) SearchKnowledge(context.Context, *SearchKnowledgeRequest) (*SearchKnowledgeResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method SearchKnowledge not implemented")
|
|
}
|
|
func (UnimplementedCustomerServiceServer) GetKnowledgeSummary(context.Context, *GetKnowledgeSummaryRequest) (*GetKnowledgeSummaryResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetKnowledgeSummary not implemented")
|
|
}
|
|
func (UnimplementedCustomerServiceServer) QueryOrder(context.Context, *QueryOrderRequest) (*QueryOrderResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method QueryOrder not implemented")
|
|
}
|
|
func (UnimplementedCustomerServiceServer) StreamChat(*StreamChatRequest, grpc.ServerStreamingServer[StreamChatResponse]) error {
|
|
return status.Errorf(codes.Unimplemented, "method StreamChat not implemented")
|
|
}
|
|
func (UnimplementedCustomerServiceServer) mustEmbedUnimplementedCustomerServiceServer() {}
|
|
func (UnimplementedCustomerServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeCustomerServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to CustomerServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeCustomerServiceServer interface {
|
|
mustEmbedUnimplementedCustomerServiceServer()
|
|
}
|
|
|
|
func RegisterCustomerServiceServer(s grpc.ServiceRegistrar, srv CustomerServiceServer) {
|
|
// If the following call pancis, it indicates UnimplementedCustomerServiceServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&CustomerService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _CustomerService_SystemStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SystemStatusRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CustomerServiceServer).SystemStatus(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CustomerService_SystemStatus_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CustomerServiceServer).SystemStatus(ctx, req.(*SystemStatusRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CustomerService_Chat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ChatRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CustomerServiceServer).Chat(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CustomerService_Chat_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CustomerServiceServer).Chat(ctx, req.(*ChatRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CustomerService_GetSessions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetSessionsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CustomerServiceServer).GetSessions(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CustomerService_GetSessions_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CustomerServiceServer).GetSessions(ctx, req.(*GetSessionsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CustomerService_CreateSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateSessionRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CustomerServiceServer).CreateSession(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CustomerService_CreateSession_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CustomerServiceServer).CreateSession(ctx, req.(*CreateSessionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CustomerService_UploadKnowledge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UploadKnowledgeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CustomerServiceServer).UploadKnowledge(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CustomerService_UploadKnowledge_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CustomerServiceServer).UploadKnowledge(ctx, req.(*UploadKnowledgeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CustomerService_ListKnowledge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListKnowledgeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CustomerServiceServer).ListKnowledge(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CustomerService_ListKnowledge_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CustomerServiceServer).ListKnowledge(ctx, req.(*ListKnowledgeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CustomerService_DeleteKnowledge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteKnowledgeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CustomerServiceServer).DeleteKnowledge(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CustomerService_DeleteKnowledge_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CustomerServiceServer).DeleteKnowledge(ctx, req.(*DeleteKnowledgeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CustomerService_SearchKnowledge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SearchKnowledgeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CustomerServiceServer).SearchKnowledge(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CustomerService_SearchKnowledge_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CustomerServiceServer).SearchKnowledge(ctx, req.(*SearchKnowledgeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CustomerService_GetKnowledgeSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetKnowledgeSummaryRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CustomerServiceServer).GetKnowledgeSummary(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CustomerService_GetKnowledgeSummary_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CustomerServiceServer).GetKnowledgeSummary(ctx, req.(*GetKnowledgeSummaryRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CustomerService_QueryOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(QueryOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CustomerServiceServer).QueryOrder(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CustomerService_QueryOrder_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CustomerServiceServer).QueryOrder(ctx, req.(*QueryOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CustomerService_StreamChat_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
m := new(StreamChatRequest)
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
return err
|
|
}
|
|
return srv.(CustomerServiceServer).StreamChat(m, &grpc.GenericServerStream[StreamChatRequest, StreamChatResponse]{ServerStream: stream})
|
|
}
|
|
|
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
|
type CustomerService_StreamChatServer = grpc.ServerStreamingServer[StreamChatResponse]
|
|
|
|
// CustomerService_ServiceDesc is the grpc.ServiceDesc for CustomerService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var CustomerService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "api.customer.v1.CustomerService",
|
|
HandlerType: (*CustomerServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "SystemStatus",
|
|
Handler: _CustomerService_SystemStatus_Handler,
|
|
},
|
|
{
|
|
MethodName: "Chat",
|
|
Handler: _CustomerService_Chat_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetSessions",
|
|
Handler: _CustomerService_GetSessions_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreateSession",
|
|
Handler: _CustomerService_CreateSession_Handler,
|
|
},
|
|
{
|
|
MethodName: "UploadKnowledge",
|
|
Handler: _CustomerService_UploadKnowledge_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListKnowledge",
|
|
Handler: _CustomerService_ListKnowledge_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteKnowledge",
|
|
Handler: _CustomerService_DeleteKnowledge_Handler,
|
|
},
|
|
{
|
|
MethodName: "SearchKnowledge",
|
|
Handler: _CustomerService_SearchKnowledge_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetKnowledgeSummary",
|
|
Handler: _CustomerService_GetKnowledgeSummary_Handler,
|
|
},
|
|
{
|
|
MethodName: "QueryOrder",
|
|
Handler: _CustomerService_QueryOrder_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "StreamChat",
|
|
Handler: _CustomerService_StreamChat_Handler,
|
|
ServerStreams: true,
|
|
},
|
|
},
|
|
Metadata: "customer/v1/customer.proto",
|
|
}
|