Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterSearchServiceServer(s grpc.ServiceRegistrar, srv SearchServiceServer)
- type News
- func (*News) Descriptor() ([]byte, []int)deprecated
- func (x *News) GetCreateTime() *timestamppb.Timestamp
- func (x *News) GetDesc() string
- func (x *News) GetHappenTime() *timestamppb.Timestamp
- func (x *News) GetId() int64
- func (x *News) GetKeyword() string
- func (x *News) GetState() int32
- func (x *News) GetTitle() string
- func (x *News) GetUpdateTime() *timestamppb.Timestamp
- func (*News) ProtoMessage()
- func (x *News) ProtoReflect() protoreflect.Message
- func (x *News) Reset()
- func (x *News) String() string
- type NewsRequest
- type NewsResponse
- type SearchServiceClient
- type SearchServiceServer
- type Timestamp
- type UnimplementedSearchServiceServer
- type UnsafeSearchServiceServer
Constants ¶
const (
SearchService_Search_FullMethodName = "/news.SearchService/Search"
)
Variables ¶
var File_news_proto protoreflect.FileDescriptor
var SearchService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "news.SearchService", HandlerType: (*SearchServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Search", Handler: _SearchService_Search_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "news.proto", }
SearchService_ServiceDesc is the grpc.ServiceDesc for SearchService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSearchServiceServer ¶
func RegisterSearchServiceServer(s grpc.ServiceRegistrar, srv SearchServiceServer)
Types ¶
type News ¶
type News struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Keyword string `protobuf:"bytes,3,opt,name=keyword,proto3" json:"keyword,omitempty"` Desc string `protobuf:"bytes,4,opt,name=desc,proto3" json:"desc,omitempty"` HappenTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=happen_time,json=happenTime,proto3" json:"happen_time,omitempty"` State int32 `protobuf:"varint,6,opt,name=state,proto3" json:"state,omitempty"` CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` UpdateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` // contains filtered or unexported fields }
func (*News) Descriptor
deprecated
func (*News) GetCreateTime ¶
func (x *News) GetCreateTime() *timestamppb.Timestamp
func (*News) GetHappenTime ¶
func (x *News) GetHappenTime() *timestamppb.Timestamp
func (*News) GetKeyword ¶
func (*News) GetUpdateTime ¶
func (x *News) GetUpdateTime() *timestamppb.Timestamp
func (*News) ProtoMessage ¶
func (*News) ProtoMessage()
func (*News) ProtoReflect ¶
func (x *News) ProtoReflect() protoreflect.Message
type NewsRequest ¶
type NewsRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*NewsRequest) Descriptor
deprecated
func (*NewsRequest) Descriptor() ([]byte, []int)
Deprecated: Use NewsRequest.ProtoReflect.Descriptor instead.
func (*NewsRequest) GetName ¶
func (x *NewsRequest) GetName() string
func (*NewsRequest) ProtoMessage ¶
func (*NewsRequest) ProtoMessage()
func (*NewsRequest) ProtoReflect ¶
func (x *NewsRequest) ProtoReflect() protoreflect.Message
func (*NewsRequest) Reset ¶
func (x *NewsRequest) Reset()
func (*NewsRequest) String ¶
func (x *NewsRequest) String() string
type NewsResponse ¶
type NewsResponse struct { NewsList []*News `protobuf:"bytes,1,rep,name=news_list,json=newsList,proto3" json:"news_list,omitempty"` // contains filtered or unexported fields }
func (*NewsResponse) Descriptor
deprecated
func (*NewsResponse) Descriptor() ([]byte, []int)
Deprecated: Use NewsResponse.ProtoReflect.Descriptor instead.
func (*NewsResponse) GetNewsList ¶
func (x *NewsResponse) GetNewsList() []*News
func (*NewsResponse) ProtoMessage ¶
func (*NewsResponse) ProtoMessage()
func (*NewsResponse) ProtoReflect ¶
func (x *NewsResponse) ProtoReflect() protoreflect.Message
func (*NewsResponse) Reset ¶
func (x *NewsResponse) Reset()
func (*NewsResponse) String ¶
func (x *NewsResponse) String() string
type SearchServiceClient ¶
type SearchServiceClient interface {
Search(ctx context.Context, in *NewsRequest, opts ...grpc.CallOption) (*NewsResponse, error)
}
SearchServiceClient is the client API for SearchService 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.
func NewSearchServiceClient ¶
func NewSearchServiceClient(cc grpc.ClientConnInterface) SearchServiceClient
type SearchServiceServer ¶
type SearchServiceServer interface { Search(context.Context, *NewsRequest) (*NewsResponse, error) // contains filtered or unexported methods }
SearchServiceServer is the server API for SearchService service. All implementations must embed UnimplementedSearchServiceServer for forward compatibility
type Timestamp ¶
type Timestamp = timestamppb.Timestamp
type UnimplementedSearchServiceServer ¶
type UnimplementedSearchServiceServer struct { }
UnimplementedSearchServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedSearchServiceServer) Search ¶
func (UnimplementedSearchServiceServer) Search(context.Context, *NewsRequest) (*NewsResponse, error)
type UnsafeSearchServiceServer ¶
type UnsafeSearchServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSearchServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SearchServiceServer will result in compilation errors.