proto

package
v0.0.0-...-ea7e8d9 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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)

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

Deprecated: Use Blog.ProtoReflect.Descriptor instead.

func (*Blog) GetAuthorId

func (x *Blog) GetAuthorId() string

func (*Blog) GetContent

func (x *Blog) GetContent() string

func (*Blog) GetId

func (x *Blog) GetId() string

func (*Blog) GetTitle

func (x *Blog) GetTitle() string

func (*Blog) ProtoMessage

func (*Blog) ProtoMessage()

func (*Blog) ProtoReflect

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

func (*Blog) Reset

func (x *Blog) Reset()

func (*Blog) String

func (x *Blog) String() string

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

Deprecated: Use BlogId.ProtoReflect.Descriptor instead.

func (*BlogId) GetId

func (x *BlogId) GetId() string

func (*BlogId) ProtoMessage

func (*BlogId) ProtoMessage()

func (*BlogId) ProtoReflect

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

func (*BlogId) Reset

func (x *BlogId) Reset()

func (*BlogId) String

func (x *BlogId) String() string

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.

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) ReadBlog

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.

Jump to

Keyboard shortcuts

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