Documentation ¶
Index ¶
- Variables
- func RegisterBlogServiceServer(s grpc.ServiceRegistrar, srv BlogServiceServer)
- func RegisterHelloServiceServer(s grpc.ServiceRegistrar, srv HelloServiceServer)
- type Blog
- type BlogServiceClient
- type BlogServiceServer
- type BlogSet
- type HelloServiceClient
- type HelloServiceServer
- type QueryBlogRequest
- func (*QueryBlogRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryBlogRequest) GetPageNumber() int64
- func (x *QueryBlogRequest) GetPageSize() int64
- func (*QueryBlogRequest) ProtoMessage()
- func (x *QueryBlogRequest) ProtoReflect() protoreflect.Message
- func (x *QueryBlogRequest) Reset()
- func (x *QueryBlogRequest) String() string
- type Request
- type Response
- type String
- type UnimplementedBlogServiceServer
- type UnimplementedHelloServiceServer
- type UnsafeBlogServiceServer
- type UnsafeHelloServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( Blog_name = map[int32]string{ 0: "DRAFT", 1: "PUBLISHED", } Blog_value = map[string]int32{ "DRAFT": 0, "PUBLISHED": 1, } )
Enum value maps for Blog.
var BlogService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "hello.BlogService", HandlerType: (*BlogServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "QueryBlog", Handler: _BlogService_QueryBlog_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pb/hello_rpc.proto", }
BlogService_ServiceDesc is the grpc.ServiceDesc for BlogService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_pb_hello_proto protoreflect.FileDescriptor
var File_pb_hello_rpc_proto protoreflect.FileDescriptor
var File_pb_hello_service_proto protoreflect.FileDescriptor
var HelloService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "hello.HelloService", HandlerType: (*HelloServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Hello", Handler: _HelloService_Hello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pb/hello_service.proto", }
HelloService_ServiceDesc is the grpc.ServiceDesc for HelloService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterBlogServiceServer ¶
func RegisterBlogServiceServer(s grpc.ServiceRegistrar, srv BlogServiceServer)
func RegisterHelloServiceServer ¶
func RegisterHelloServiceServer(s grpc.ServiceRegistrar, srv HelloServiceServer)
Types ¶
type Blog ¶
type Blog int32
func (Blog) Descriptor ¶
func (Blog) Descriptor() protoreflect.EnumDescriptor
func (Blog) EnumDescriptor
deprecated
func (Blog) Number ¶
func (x Blog) Number() protoreflect.EnumNumber
func (Blog) Type ¶
func (Blog) Type() protoreflect.EnumType
type BlogServiceClient ¶
type BlogServiceClient interface {
QueryBlog(ctx context.Context, in *QueryBlogRequest, opts ...grpc.CallOption) (*BlogSet, error)
}
BlogServiceClient is the client API for BlogService 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 NewBlogServiceClient ¶
func NewBlogServiceClient(cc grpc.ClientConnInterface) BlogServiceClient
type BlogServiceServer ¶
type BlogServiceServer interface { QueryBlog(context.Context, *QueryBlogRequest) (*BlogSet, error) // contains filtered or unexported methods }
BlogServiceServer is the server API for BlogService service. All implementations must embed UnimplementedBlogServiceServer for forward compatibility
type BlogSet ¶
type BlogSet struct { BlogId int64 `protobuf:"varint,1,opt,name=blog_id,json=blogId,proto3" json:"blog_id,omitempty"` BlogTitle string `protobuf:"bytes,2,opt,name=blog_title,json=blogTitle,proto3" json:"blog_title,omitempty"` // contains filtered or unexported fields }
func (*BlogSet) Descriptor
deprecated
func (*BlogSet) GetBlogTitle ¶
func (*BlogSet) ProtoMessage ¶
func (*BlogSet) ProtoMessage()
func (*BlogSet) ProtoReflect ¶
func (x *BlogSet) ProtoReflect() protoreflect.Message
type HelloServiceClient ¶
type HelloServiceClient interface {
Hello(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
HelloServiceClient is the client API for HelloService 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 NewHelloServiceClient ¶
func NewHelloServiceClient(cc grpc.ClientConnInterface) HelloServiceClient
type HelloServiceServer ¶
type HelloServiceServer interface { Hello(context.Context, *Request) (*Response, error) // contains filtered or unexported methods }
HelloServiceServer is the server API for HelloService service. All implementations must embed UnimplementedHelloServiceServer for forward compatibility
type QueryBlogRequest ¶
type QueryBlogRequest struct { PageSize int64 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` PageNumber int64 `protobuf:"varint,2,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` // contains filtered or unexported fields }
func (*QueryBlogRequest) Descriptor
deprecated
func (*QueryBlogRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryBlogRequest.ProtoReflect.Descriptor instead.
func (*QueryBlogRequest) GetPageNumber ¶
func (x *QueryBlogRequest) GetPageNumber() int64
func (*QueryBlogRequest) GetPageSize ¶
func (x *QueryBlogRequest) GetPageSize() int64
func (*QueryBlogRequest) ProtoMessage ¶
func (*QueryBlogRequest) ProtoMessage()
func (*QueryBlogRequest) ProtoReflect ¶
func (x *QueryBlogRequest) ProtoReflect() protoreflect.Message
func (*QueryBlogRequest) Reset ¶
func (x *QueryBlogRequest) Reset()
func (*QueryBlogRequest) String ¶
func (x *QueryBlogRequest) String() string
type Request ¶
type Request struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type String ¶
type String struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*String) Descriptor
deprecated
func (*String) ProtoMessage ¶
func (*String) ProtoMessage()
func (*String) ProtoReflect ¶
func (x *String) ProtoReflect() protoreflect.Message
type UnimplementedBlogServiceServer ¶
type UnimplementedBlogServiceServer struct { }
UnimplementedBlogServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedBlogServiceServer) QueryBlog ¶
func (UnimplementedBlogServiceServer) QueryBlog(context.Context, *QueryBlogRequest) (*BlogSet, error)
type UnimplementedHelloServiceServer ¶
type UnimplementedHelloServiceServer struct { }
UnimplementedHelloServiceServer must be embedded to have forward compatible implementations.
type UnsafeBlogServiceServer ¶
type UnsafeBlogServiceServer interface {
// contains filtered or unexported methods
}
UnsafeBlogServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BlogServiceServer will result in compilation errors.
type UnsafeHelloServiceServer ¶
type UnsafeHelloServiceServer interface {
// contains filtered or unexported methods
}
UnsafeHelloServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HelloServiceServer will result in compilation errors.