Documentation ¶
Index ¶
- Variables
- func RegisterBlogServiceServer(s grpc.ServiceRegistrar, srv BlogServiceServer)
- type BlogDto
- func (*BlogDto) Descriptor() ([]byte, []int)deprecated
- func (x *BlogDto) GetAuthorId() string
- func (x *BlogDto) GetContent() string
- func (x *BlogDto) GetId() string
- func (x *BlogDto) GetTitle() string
- func (*BlogDto) ProtoMessage()
- func (x *BlogDto) ProtoReflect() protoreflect.Message
- func (x *BlogDto) Reset()
- func (x *BlogDto) String() string
- type BlogIdDto
- type BlogServiceClient
- type BlogServiceServer
- type BlogService_ListBlogsClient
- type BlogService_ListBlogsServer
- type UnimplementedBlogServiceServer
- func (UnimplementedBlogServiceServer) CreateBlog(context.Context, *BlogDto) (*BlogIdDto, error)
- func (UnimplementedBlogServiceServer) DeleteBlog(context.Context, *BlogIdDto) (*emptypb.Empty, error)
- func (UnimplementedBlogServiceServer) ListBlogs(*emptypb.Empty, BlogService_ListBlogsServer) error
- func (UnimplementedBlogServiceServer) ReadBlog(context.Context, *BlogIdDto) (*BlogDto, error)
- func (UnimplementedBlogServiceServer) UpdateBlog(context.Context, *BlogDto) (*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/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_blog_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBlogServiceServer ¶
func RegisterBlogServiceServer(s grpc.ServiceRegistrar, srv BlogServiceServer)
Types ¶
type BlogDto ¶
type BlogDto 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 (*BlogDto) Descriptor
deprecated
func (*BlogDto) GetAuthorId ¶
func (*BlogDto) GetContent ¶
func (*BlogDto) ProtoMessage ¶
func (*BlogDto) ProtoMessage()
func (*BlogDto) ProtoReflect ¶
func (x *BlogDto) ProtoReflect() protoreflect.Message
type BlogIdDto ¶
type BlogIdDto struct { BlogId string `protobuf:"bytes,1,opt,name=blog_id,json=blogId,proto3" json:"blog_id,omitempty"` // contains filtered or unexported fields }
func (*BlogIdDto) Descriptor
deprecated
func (*BlogIdDto) ProtoMessage ¶
func (*BlogIdDto) ProtoMessage()
func (*BlogIdDto) ProtoReflect ¶
func (x *BlogIdDto) ProtoReflect() protoreflect.Message
type BlogServiceClient ¶
type BlogServiceClient interface { CreateBlog(ctx context.Context, in *BlogDto, opts ...grpc.CallOption) (*BlogIdDto, error) ReadBlog(ctx context.Context, in *BlogIdDto, opts ...grpc.CallOption) (*BlogDto, error) UpdateBlog(ctx context.Context, in *BlogDto, opts ...grpc.CallOption) (*emptypb.Empty, error) DeleteBlog(ctx context.Context, in *BlogIdDto, 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, *BlogDto) (*BlogIdDto, error) ReadBlog(context.Context, *BlogIdDto) (*BlogDto, error) UpdateBlog(context.Context, *BlogDto) (*emptypb.Empty, error) DeleteBlog(context.Context, *BlogIdDto) (*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() (*BlogDto, error) grpc.ClientStream }
type BlogService_ListBlogsServer ¶
type BlogService_ListBlogsServer interface { Send(*BlogDto) 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.