Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DataAnalysis_ServiceDesc = grpc.ServiceDesc{ ServiceName: "analysis.DataAnalysis", HandlerType: (*DataAnalysisServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AnalyzeByAuthor", Handler: _DataAnalysis_AnalyzeByAuthor_Handler, }, { MethodName: "AnalyzeByPostId", Handler: _DataAnalysis_AnalyzeByPostId_Handler, }, { MethodName: "AnalyzePost", Handler: _DataAnalysis_AnalyzePost_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "analysis.proto", }
DataAnalysis_ServiceDesc is the grpc.ServiceDesc for DataAnalysis service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_analysis_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDataAnalysisServer ¶
func RegisterDataAnalysisServer(s grpc.ServiceRegistrar, srv DataAnalysisServer)
Types ¶
type Author ¶
type Author struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*Author) Descriptor
deprecated
func (*Author) ProtoMessage ¶
func (*Author) ProtoMessage()
func (*Author) ProtoReflect ¶
func (x *Author) ProtoReflect() protoreflect.Message
type DataAnalysisClient ¶
type DataAnalysisClient interface { AnalyzeByAuthor(ctx context.Context, in *Author, opts ...grpc.CallOption) (*Status, error) AnalyzeByPostId(ctx context.Context, in *Id, opts ...grpc.CallOption) (*PostResult, error) AnalyzePost(ctx context.Context, in *Text, opts ...grpc.CallOption) (*PostResult, error) }
DataAnalysisClient is the client API for DataAnalysis service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.golang.ir/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewDataAnalysisClient ¶
func NewDataAnalysisClient(cc grpc.ClientConnInterface) DataAnalysisClient
type DataAnalysisServer ¶
type DataAnalysisServer interface { AnalyzeByAuthor(context.Context, *Author) (*Status, error) AnalyzeByPostId(context.Context, *Id) (*PostResult, error) AnalyzePost(context.Context, *Text) (*PostResult, error) // contains filtered or unexported methods }
DataAnalysisServer is the server API for DataAnalysis service. All implementations must embed UnimplementedDataAnalysisServer for forward compatibility
type Id ¶
type Id struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*Id) Descriptor
deprecated
func (*Id) ProtoMessage ¶
func (*Id) ProtoMessage()
func (*Id) ProtoReflect ¶
func (x *Id) ProtoReflect() protoreflect.Message
type PostResult ¶
type PostResult struct { Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*PostResult) Descriptor
deprecated
func (*PostResult) Descriptor() ([]byte, []int)
Deprecated: Use PostResult.ProtoReflect.Descriptor instead.
func (*PostResult) GetResult ¶
func (x *PostResult) GetResult() string
func (*PostResult) ProtoMessage ¶
func (*PostResult) ProtoMessage()
func (*PostResult) ProtoReflect ¶
func (x *PostResult) ProtoReflect() protoreflect.Message
func (*PostResult) Reset ¶
func (x *PostResult) Reset()
func (*PostResult) String ¶
func (x *PostResult) String() string
type Status ¶
type Status struct { Score int32 `protobuf:"varint,1,opt,name=score,proto3" json:"score,omitempty"` // contains filtered or unexported fields }
func (*Status) Descriptor
deprecated
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) ProtoReflect ¶
func (x *Status) ProtoReflect() protoreflect.Message
type Text ¶
type Text struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // contains filtered or unexported fields }
func (*Text) Descriptor
deprecated
func (*Text) ProtoMessage ¶
func (*Text) ProtoMessage()
func (*Text) ProtoReflect ¶
func (x *Text) ProtoReflect() protoreflect.Message
type UnimplementedDataAnalysisServer ¶
type UnimplementedDataAnalysisServer struct { }
UnimplementedDataAnalysisServer must be embedded to have forward compatible implementations.
func (UnimplementedDataAnalysisServer) AnalyzeByAuthor ¶
func (UnimplementedDataAnalysisServer) AnalyzeByPostId ¶
func (UnimplementedDataAnalysisServer) AnalyzeByPostId(context.Context, *Id) (*PostResult, error)
func (UnimplementedDataAnalysisServer) AnalyzePost ¶
func (UnimplementedDataAnalysisServer) AnalyzePost(context.Context, *Text) (*PostResult, error)
type UnsafeDataAnalysisServer ¶
type UnsafeDataAnalysisServer interface {
// contains filtered or unexported methods
}
UnsafeDataAnalysisServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DataAnalysisServer will result in compilation errors.