news

package
v0.1.3-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SearchService_Search_FullMethodName = "/news.SearchService/Search"
)

Variables

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

Deprecated: Use News.ProtoReflect.Descriptor instead.

func (*News) GetCreateTime

func (x *News) GetCreateTime() *timestamppb.Timestamp

func (*News) GetDesc

func (x *News) GetDesc() string

func (*News) GetHappenTime

func (x *News) GetHappenTime() *timestamppb.Timestamp

func (*News) GetId

func (x *News) GetId() int64

func (*News) GetKeyword

func (x *News) GetKeyword() string

func (*News) GetState

func (x *News) GetState() int32

func (*News) GetTitle

func (x *News) GetTitle() string

func (*News) GetUpdateTime

func (x *News) GetUpdateTime() *timestamppb.Timestamp

func (*News) ProtoMessage

func (*News) ProtoMessage()

func (*News) ProtoReflect

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

func (*News) Reset

func (x *News) Reset()

func (*News) String

func (x *News) String() string

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.

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

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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