Documentation ¶
Index ¶
- Variables
- func RegisterBlogServiceServer(s grpc.ServiceRegistrar, srv BlogServiceServer)
- type Blog
- func (*Blog) Descriptor() ([]byte, []int)deprecated
- func (x *Blog) GetAuthorId() string
- func (x *Blog) GetContent() string
- func (x *Blog) GetId() string
- func (x *Blog) GetTitle() string
- func (*Blog) ProtoMessage()
- func (x *Blog) ProtoReflect() protoreflect.Message
- func (x *Blog) Reset()
- func (x *Blog) String() string
- type BlogId
- type BlogServiceClient
- type BlogServiceServer
- type BlogService_ListBlogsClient
- type BlogService_ListBlogsServer
- type UnimplementedBlogServiceServer
- func (UnimplementedBlogServiceServer) CreateBlog(context.Context, *Blog) (*BlogId, error)
- func (UnimplementedBlogServiceServer) DeleteBlog(context.Context, *BlogId) (*emptypb.Empty, error)
- func (UnimplementedBlogServiceServer) ListBlogs(*emptypb.Empty, BlogService_ListBlogsServer) error
- func (UnimplementedBlogServiceServer) ReadBlog(context.Context, *BlogId) (*Blog, error)
- func (UnimplementedBlogServiceServer) UpdateBlog(context.Context, *Blog) (*emptypb.Empty, error)
- type UnsafeBlogServiceServer
Constants ¶
This section is empty.
Variables ¶
var BlogService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "blog.BlogService", HandlerType: (*BlogServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateBlog", Handler: _BlogService_CreateBlog_Handler, }, { MethodName: "ReadBlog", Handler: _BlogService_ReadBlog_Handler, }, { MethodName: "UpdateBlog", Handler: _BlogService_UpdateBlog_Handler, }, { MethodName: "DeleteBlog", Handler: _BlogService_DeleteBlog_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ListBlogs", Handler: _BlogService_ListBlogs_Handler, ServerStreams: true, }, }, Metadata: "blog.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_blog_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBlogServiceServer ¶
func RegisterBlogServiceServer(s grpc.ServiceRegistrar, srv BlogServiceServer)
Types ¶
type Blog ¶
type Blog struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` AuthorId string `protobuf:"bytes,2,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"` Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*Blog) Descriptor
deprecated
func (*Blog) GetAuthorId ¶
func (*Blog) GetContent ¶
func (*Blog) ProtoMessage ¶
func (*Blog) ProtoMessage()
func (*Blog) ProtoReflect ¶
func (x *Blog) ProtoReflect() protoreflect.Message
type BlogId ¶
type BlogId struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*BlogId) Descriptor
deprecated
func (*BlogId) ProtoMessage ¶
func (*BlogId) ProtoMessage()
func (*BlogId) ProtoReflect ¶
func (x *BlogId) ProtoReflect() protoreflect.Message
type BlogServiceClient ¶
type BlogServiceClient interface { CreateBlog(ctx context.Context, in *Blog, opts ...grpc.CallOption) (*BlogId, error) ReadBlog(ctx context.Context, in *BlogId, opts ...grpc.CallOption) (*Blog, error) UpdateBlog(ctx context.Context, in *Blog, opts ...grpc.CallOption) (*emptypb.Empty, error) DeleteBlog(ctx context.Context, in *BlogId, opts ...grpc.CallOption) (*emptypb.Empty, error) ListBlogs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (BlogService_ListBlogsClient, 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 { CreateBlog(context.Context, *Blog) (*BlogId, error) ReadBlog(context.Context, *BlogId) (*Blog, error) UpdateBlog(context.Context, *Blog) (*emptypb.Empty, error) DeleteBlog(context.Context, *BlogId) (*emptypb.Empty, error) ListBlogs(*emptypb.Empty, BlogService_ListBlogsServer) error // contains filtered or unexported methods }
BlogServiceServer is the server API for BlogService service. All implementations must embed UnimplementedBlogServiceServer for forward compatibility
type BlogService_ListBlogsClient ¶
type BlogService_ListBlogsClient interface { Recv() (*Blog, error) grpc.ClientStream }
type BlogService_ListBlogsServer ¶
type BlogService_ListBlogsServer interface { Send(*Blog) error grpc.ServerStream }
type UnimplementedBlogServiceServer ¶
type UnimplementedBlogServiceServer struct { }
UnimplementedBlogServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedBlogServiceServer) CreateBlog ¶
func (UnimplementedBlogServiceServer) DeleteBlog ¶
func (UnimplementedBlogServiceServer) ListBlogs ¶
func (UnimplementedBlogServiceServer) ListBlogs(*emptypb.Empty, BlogService_ListBlogsServer) error
func (UnimplementedBlogServiceServer) UpdateBlog ¶
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.