Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterEnrichServiceServer(s grpc.ServiceRegistrar, srv EnrichServiceServer)
- type Data
- type EnrichRequest
- func (*EnrichRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EnrichRequest) GetBody() string
- func (x *EnrichRequest) GetLang() string
- func (*EnrichRequest) ProtoMessage()
- func (x *EnrichRequest) ProtoReflect() protoreflect.Message
- func (x *EnrichRequest) Reset()
- func (x *EnrichRequest) String() string
- type EnrichResponse
- func (*EnrichResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EnrichResponse) GetCode() int32
- func (x *EnrichResponse) GetData() *Data
- func (x *EnrichResponse) GetMessage() string
- func (x *EnrichResponse) GetStatus() string
- func (*EnrichResponse) ProtoMessage()
- func (x *EnrichResponse) ProtoReflect() protoreflect.Message
- func (x *EnrichResponse) Reset()
- func (x *EnrichResponse) String() string
- type EnrichServiceClient
- type EnrichServiceServer
- type Entity
- func (*Entity) Descriptor() ([]byte, []int)deprecated
- func (x *Entity) GetIndex() []int32
- func (x *Entity) GetScore() float64
- func (x *Entity) GetText() string
- func (x *Entity) GetType() string
- func (*Entity) ProtoMessage()
- func (x *Entity) ProtoReflect() protoreflect.Message
- func (x *Entity) Reset()
- func (x *Entity) String() string
- type NLP
- func (*NLP) Descriptor() ([]byte, []int)deprecated
- func (x *NLP) GetClaims() []*Entity
- func (x *NLP) GetEntities() []*Entity
- func (x *NLP) GetKeywords() []string
- func (x *NLP) GetQuotes() []*Entity
- func (x *NLP) GetStopwords() []string
- func (x *NLP) GetSummary() string
- func (x *NLP) GetTopics() []*Entity
- func (*NLP) ProtoMessage()
- func (x *NLP) ProtoReflect() protoreflect.Message
- func (x *NLP) Reset()
- func (x *NLP) String() string
- type UnimplementedEnrichServiceServer
- func (UnimplementedEnrichServiceServer) Claims(context.Context, *EnrichRequest) (*EnrichResponse, error)
- func (UnimplementedEnrichServiceServer) Entities(context.Context, *EnrichRequest) (*EnrichResponse, error)
- func (UnimplementedEnrichServiceServer) Keywords(context.Context, *EnrichRequest) (*EnrichResponse, error)
- func (UnimplementedEnrichServiceServer) NLP(context.Context, *EnrichRequest) (*EnrichResponse, error)
- func (UnimplementedEnrichServiceServer) Quotes(context.Context, *EnrichRequest) (*EnrichResponse, error)
- func (UnimplementedEnrichServiceServer) StopWords(context.Context, *EnrichRequest) (*EnrichResponse, error)
- func (UnimplementedEnrichServiceServer) Summary(context.Context, *EnrichRequest) (*EnrichResponse, error)
- func (UnimplementedEnrichServiceServer) Topics(context.Context, *EnrichRequest) (*EnrichResponse, error)
- type UnsafeEnrichServiceServer
Constants ¶
const ( EnrichService_NLP_FullMethodName = "/mediawatch.enrich.v2.EnrichService/NLP" EnrichService_StopWords_FullMethodName = "/mediawatch.enrich.v2.EnrichService/StopWords" EnrichService_Keywords_FullMethodName = "/mediawatch.enrich.v2.EnrichService/Keywords" EnrichService_Entities_FullMethodName = "/mediawatch.enrich.v2.EnrichService/Entities" EnrichService_Summary_FullMethodName = "/mediawatch.enrich.v2.EnrichService/Summary" EnrichService_Topics_FullMethodName = "/mediawatch.enrich.v2.EnrichService/Topics" EnrichService_Quotes_FullMethodName = "/mediawatch.enrich.v2.EnrichService/Quotes" EnrichService_Claims_FullMethodName = "/mediawatch.enrich.v2.EnrichService/Claims" )
Variables ¶
var EnrichService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "mediawatch.enrich.v2.EnrichService", HandlerType: (*EnrichServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "NLP", Handler: _EnrichService_NLP_Handler, }, { MethodName: "StopWords", Handler: _EnrichService_StopWords_Handler, }, { MethodName: "Keywords", Handler: _EnrichService_Keywords_Handler, }, { MethodName: "Entities", Handler: _EnrichService_Entities_Handler, }, { MethodName: "Summary", Handler: _EnrichService_Summary_Handler, }, { MethodName: "Topics", Handler: _EnrichService_Topics_Handler, }, { MethodName: "Quotes", Handler: _EnrichService_Quotes_Handler, }, { MethodName: "Claims", Handler: _EnrichService_Claims_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "mediawatch/enrich/v2/enrich.proto", }
EnrichService_ServiceDesc is the grpc.ServiceDesc for EnrichService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_mediawatch_enrich_v2_enrich_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEnrichServiceServer ¶
func RegisterEnrichServiceServer(s grpc.ServiceRegistrar, srv EnrichServiceServer)
Types ¶
type Data ¶
type Data struct { Nlp *NLP `protobuf:"bytes,1,opt,name=nlp,proto3" json:"nlp,omitempty"` // contains filtered or unexported fields }
func (*Data) Descriptor
deprecated
func (*Data) ProtoMessage ¶
func (*Data) ProtoMessage()
func (*Data) ProtoReflect ¶
func (x *Data) ProtoReflect() protoreflect.Message
type EnrichRequest ¶
type EnrichRequest struct { Body string `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` Lang string `protobuf:"bytes,2,opt,name=lang,proto3" json:"lang,omitempty"` // contains filtered or unexported fields }
func (*EnrichRequest) Descriptor
deprecated
func (*EnrichRequest) Descriptor() ([]byte, []int)
Deprecated: Use EnrichRequest.ProtoReflect.Descriptor instead.
func (*EnrichRequest) GetBody ¶
func (x *EnrichRequest) GetBody() string
func (*EnrichRequest) GetLang ¶
func (x *EnrichRequest) GetLang() string
func (*EnrichRequest) ProtoMessage ¶
func (*EnrichRequest) ProtoMessage()
func (*EnrichRequest) ProtoReflect ¶
func (x *EnrichRequest) ProtoReflect() protoreflect.Message
func (*EnrichRequest) Reset ¶
func (x *EnrichRequest) Reset()
func (*EnrichRequest) String ¶
func (x *EnrichRequest) String() string
type EnrichResponse ¶
type EnrichResponse struct { // success, error Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // 200, 500 Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` // message Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // data Object {} Data *Data `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*EnrichResponse) Descriptor
deprecated
func (*EnrichResponse) Descriptor() ([]byte, []int)
Deprecated: Use EnrichResponse.ProtoReflect.Descriptor instead.
func (*EnrichResponse) GetCode ¶
func (x *EnrichResponse) GetCode() int32
func (*EnrichResponse) GetData ¶
func (x *EnrichResponse) GetData() *Data
func (*EnrichResponse) GetMessage ¶
func (x *EnrichResponse) GetMessage() string
func (*EnrichResponse) GetStatus ¶
func (x *EnrichResponse) GetStatus() string
func (*EnrichResponse) ProtoMessage ¶
func (*EnrichResponse) ProtoMessage()
func (*EnrichResponse) ProtoReflect ¶
func (x *EnrichResponse) ProtoReflect() protoreflect.Message
func (*EnrichResponse) Reset ¶
func (x *EnrichResponse) Reset()
func (*EnrichResponse) String ¶
func (x *EnrichResponse) String() string
type EnrichServiceClient ¶
type EnrichServiceClient interface { NLP(ctx context.Context, in *EnrichRequest, opts ...grpc.CallOption) (*EnrichResponse, error) StopWords(ctx context.Context, in *EnrichRequest, opts ...grpc.CallOption) (*EnrichResponse, error) Keywords(ctx context.Context, in *EnrichRequest, opts ...grpc.CallOption) (*EnrichResponse, error) Entities(ctx context.Context, in *EnrichRequest, opts ...grpc.CallOption) (*EnrichResponse, error) Summary(ctx context.Context, in *EnrichRequest, opts ...grpc.CallOption) (*EnrichResponse, error) Topics(ctx context.Context, in *EnrichRequest, opts ...grpc.CallOption) (*EnrichResponse, error) Quotes(ctx context.Context, in *EnrichRequest, opts ...grpc.CallOption) (*EnrichResponse, error) Claims(ctx context.Context, in *EnrichRequest, opts ...grpc.CallOption) (*EnrichResponse, error) }
EnrichServiceClient is the client API for EnrichService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkgo.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewEnrichServiceClient ¶
func NewEnrichServiceClient(cc grpc.ClientConnInterface) EnrichServiceClient
type EnrichServiceServer ¶
type EnrichServiceServer interface { NLP(context.Context, *EnrichRequest) (*EnrichResponse, error) StopWords(context.Context, *EnrichRequest) (*EnrichResponse, error) Keywords(context.Context, *EnrichRequest) (*EnrichResponse, error) Entities(context.Context, *EnrichRequest) (*EnrichResponse, error) Summary(context.Context, *EnrichRequest) (*EnrichResponse, error) Topics(context.Context, *EnrichRequest) (*EnrichResponse, error) Quotes(context.Context, *EnrichRequest) (*EnrichResponse, error) Claims(context.Context, *EnrichRequest) (*EnrichResponse, error) }
EnrichServiceServer is the server API for EnrichService service. All implementations should embed UnimplementedEnrichServiceServer for forward compatibility.
type Entity ¶
type Entity struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` Score float64 `protobuf:"fixed64,3,opt,name=score,proto3" json:"score,omitempty"` Index []int32 `protobuf:"varint,4,rep,packed,name=index,proto3" json:"index,omitempty"` // contains filtered or unexported fields }
func (*Entity) Descriptor
deprecated
func (*Entity) ProtoMessage ¶
func (*Entity) ProtoMessage()
func (*Entity) ProtoReflect ¶
func (x *Entity) ProtoReflect() protoreflect.Message
type NLP ¶
type NLP struct { Stopwords []string `protobuf:"bytes,1,rep,name=stopwords,proto3" json:"stopwords,omitempty"` Keywords []string `protobuf:"bytes,2,rep,name=keywords,proto3" json:"keywords,omitempty"` Entities []*Entity `protobuf:"bytes,3,rep,name=entities,proto3" json:"entities,omitempty"` Summary string `protobuf:"bytes,4,opt,name=summary,proto3" json:"summary,omitempty"` Topics []*Entity `protobuf:"bytes,5,rep,name=topics,proto3" json:"topics,omitempty"` Claims []*Entity `protobuf:"bytes,6,rep,name=claims,proto3" json:"claims,omitempty"` Quotes []*Entity `protobuf:"bytes,7,rep,name=quotes,proto3" json:"quotes,omitempty"` // contains filtered or unexported fields }
func (*NLP) Descriptor
deprecated
func (*NLP) GetEntities ¶
func (*NLP) GetKeywords ¶
func (*NLP) GetStopwords ¶
func (*NLP) GetSummary ¶
func (*NLP) ProtoMessage ¶
func (*NLP) ProtoMessage()
func (*NLP) ProtoReflect ¶
func (x *NLP) ProtoReflect() protoreflect.Message
type UnimplementedEnrichServiceServer ¶
type UnimplementedEnrichServiceServer struct{}
UnimplementedEnrichServiceServer should 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.
func (UnimplementedEnrichServiceServer) Claims ¶
func (UnimplementedEnrichServiceServer) Claims(context.Context, *EnrichRequest) (*EnrichResponse, error)
func (UnimplementedEnrichServiceServer) Entities ¶
func (UnimplementedEnrichServiceServer) Entities(context.Context, *EnrichRequest) (*EnrichResponse, error)
func (UnimplementedEnrichServiceServer) Keywords ¶
func (UnimplementedEnrichServiceServer) Keywords(context.Context, *EnrichRequest) (*EnrichResponse, error)
func (UnimplementedEnrichServiceServer) NLP ¶
func (UnimplementedEnrichServiceServer) NLP(context.Context, *EnrichRequest) (*EnrichResponse, error)
func (UnimplementedEnrichServiceServer) Quotes ¶
func (UnimplementedEnrichServiceServer) Quotes(context.Context, *EnrichRequest) (*EnrichResponse, error)
func (UnimplementedEnrichServiceServer) StopWords ¶
func (UnimplementedEnrichServiceServer) StopWords(context.Context, *EnrichRequest) (*EnrichResponse, error)
func (UnimplementedEnrichServiceServer) Summary ¶
func (UnimplementedEnrichServiceServer) Summary(context.Context, *EnrichRequest) (*EnrichResponse, error)
func (UnimplementedEnrichServiceServer) Topics ¶
func (UnimplementedEnrichServiceServer) Topics(context.Context, *EnrichRequest) (*EnrichResponse, error)
type UnsafeEnrichServiceServer ¶
type UnsafeEnrichServiceServer interface {
// contains filtered or unexported methods
}
UnsafeEnrichServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EnrichServiceServer will result in compilation errors.