analysisdriver

package module
v0.0.0-...-fcc6f80 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2022 License: GPL-3.0 Imports: 8 Imported by: 1

README

analysisdriver

A driver to connect to data-analysis center.

Documentation

Index

Constants

This section is empty.

Variables

View Source
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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Author.ProtoReflect.Descriptor instead.

func (*Author) GetName

func (x *Author) GetName() string

func (*Author) ProtoMessage

func (*Author) ProtoMessage()

func (*Author) ProtoReflect

func (x *Author) ProtoReflect() protoreflect.Message

func (*Author) Reset

func (x *Author) Reset()

func (*Author) String

func (x *Author) String() string

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.

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) Descriptor() ([]byte, []int)

Deprecated: Use Id.ProtoReflect.Descriptor instead.

func (*Id) GetId

func (x *Id) GetId() int64

func (*Id) ProtoMessage

func (*Id) ProtoMessage()

func (*Id) ProtoReflect

func (x *Id) ProtoReflect() protoreflect.Message

func (*Id) Reset

func (x *Id) Reset()

func (*Id) String

func (x *Id) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetScore

func (x *Status) GetScore() int32

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

func (x *Status) ProtoReflect() protoreflect.Message

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Text.ProtoReflect.Descriptor instead.

func (*Text) GetText

func (x *Text) GetText() string

func (*Text) ProtoMessage

func (*Text) ProtoMessage()

func (*Text) ProtoReflect

func (x *Text) ProtoReflect() protoreflect.Message

func (*Text) Reset

func (x *Text) Reset()

func (*Text) String

func (x *Text) String() string

type UnimplementedDataAnalysisServer

type UnimplementedDataAnalysisServer struct {
}

UnimplementedDataAnalysisServer must be embedded to have forward compatible implementations.

func (UnimplementedDataAnalysisServer) AnalyzeByAuthor

func (UnimplementedDataAnalysisServer) AnalyzeByPostId

func (UnimplementedDataAnalysisServer) AnalyzePost

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.

Directories

Path Synopsis
Package main implements a client for DataAnalysis service.
Package main implements a client for DataAnalysis service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL