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_ListClient
- type BlogService_ListServer
- type UnimplementedBlogServiceServer
- func (UnimplementedBlogServiceServer) Create(context.Context, *Blog) (*BlogID, error)
- func (UnimplementedBlogServiceServer) Delete(context.Context, *BlogID) (*empty.Empty, error)
- func (UnimplementedBlogServiceServer) List(*empty.Empty, BlogService_ListServer) error
- func (UnimplementedBlogServiceServer) Read(context.Context, *BlogID) (*Blog, error)
- func (UnimplementedBlogServiceServer) Update(context.Context, *Blog) (*empty.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: "Create", Handler: _BlogService_Create_Handler, }, { MethodName: "Read", Handler: _BlogService_Read_Handler, }, { MethodName: "Update", Handler: _BlogService_Update_Handler, }, { MethodName: "Delete", Handler: _BlogService_Delete_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "List", Handler: _BlogService_List_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 { Create(ctx context.Context, in *Blog, opts ...grpc.CallOption) (*BlogID, error) Read(ctx context.Context, in *BlogID, opts ...grpc.CallOption) (*Blog, error) Update(ctx context.Context, in *Blog, opts ...grpc.CallOption) (*empty.Empty, error) Delete(ctx context.Context, in *BlogID, opts ...grpc.CallOption) (*empty.Empty, error) List(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (BlogService_ListClient, 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 { Create(context.Context, *Blog) (*BlogID, error) Read(context.Context, *BlogID) (*Blog, error) Update(context.Context, *Blog) (*empty.Empty, error) Delete(context.Context, *BlogID) (*empty.Empty, error) List(*empty.Empty, BlogService_ListServer) error // contains filtered or unexported methods }
BlogServiceServer is the server API for BlogService service. All implementations must embed UnimplementedBlogServiceServer for forward compatibility
type BlogService_ListClient ¶
type BlogService_ListClient interface { Recv() (*Blog, error) grpc.ClientStream }
type BlogService_ListServer ¶
type BlogService_ListServer interface { Send(*Blog) error grpc.ServerStream }
type UnimplementedBlogServiceServer ¶
type UnimplementedBlogServiceServer struct { }
UnimplementedBlogServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedBlogServiceServer) List ¶
func (UnimplementedBlogServiceServer) List(*empty.Empty, BlogService_ListServer) error
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.