proto

package
v0.0.0-...-aaca63d Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: Apache-2.0 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/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)

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

Deprecated: Use BlogDto.ProtoReflect.Descriptor instead.

func (*BlogDto) GetAuthorId

func (x *BlogDto) GetAuthorId() string

func (*BlogDto) GetContent

func (x *BlogDto) GetContent() string

func (*BlogDto) GetId

func (x *BlogDto) GetId() string

func (*BlogDto) GetTitle

func (x *BlogDto) GetTitle() string

func (*BlogDto) ProtoMessage

func (*BlogDto) ProtoMessage()

func (*BlogDto) ProtoReflect

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

func (*BlogDto) Reset

func (x *BlogDto) Reset()

func (*BlogDto) String

func (x *BlogDto) String() string

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

Deprecated: Use BlogIdDto.ProtoReflect.Descriptor instead.

func (*BlogIdDto) GetBlogId

func (x *BlogIdDto) GetBlogId() string

func (*BlogIdDto) ProtoMessage

func (*BlogIdDto) ProtoMessage()

func (*BlogIdDto) ProtoReflect

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

func (*BlogIdDto) Reset

func (x *BlogIdDto) Reset()

func (*BlogIdDto) String

func (x *BlogIdDto) String() string

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.

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