pb

package
v0.0.0-...-e68236f Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "comment.CommentService",
	HandlerType: (*CommentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetCommentByPost",
			Handler:    _CommentService_GetCommentByPost_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "protos/comment.proto",
}

CommentService_ServiceDesc is the grpc.ServiceDesc for CommentService 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_protos_comment_proto protoreflect.FileDescriptor
View Source
var File_protos_post_proto protoreflect.FileDescriptor
View Source
var PostService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "post.PostService",
	HandlerType: (*PostServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetPostById",
			Handler:    _PostService_GetPostById_Handler,
		},
		{
			MethodName: "AddPost",
			Handler:    _PostService_AddPost_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "protos/post.proto",
}

PostService_ServiceDesc is the grpc.ServiceDesc for PostService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterCommentServiceServer

func RegisterCommentServiceServer(s grpc.ServiceRegistrar, srv CommentServiceServer)

func RegisterPostServiceServer

func RegisterPostServiceServer(s grpc.ServiceRegistrar, srv PostServiceServer)

Types

type AddPostRequest

type AddPostRequest struct {
	UserId   string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
	Contents string `protobuf:"bytes,2,opt,name=contents,proto3" json:"contents,omitempty"`
	// contains filtered or unexported fields
}

func (*AddPostRequest) Descriptor deprecated

func (*AddPostRequest) Descriptor() ([]byte, []int)

Deprecated: Use AddPostRequest.ProtoReflect.Descriptor instead.

func (*AddPostRequest) GetContents

func (x *AddPostRequest) GetContents() string

func (*AddPostRequest) GetUserId

func (x *AddPostRequest) GetUserId() string

func (*AddPostRequest) ProtoMessage

func (*AddPostRequest) ProtoMessage()

func (*AddPostRequest) ProtoReflect

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

func (*AddPostRequest) Reset

func (x *AddPostRequest) Reset()

func (*AddPostRequest) String

func (x *AddPostRequest) String() string

type Comment

type Comment struct {
	CommentId string `protobuf:"bytes,1,opt,name=commentId,proto3" json:"commentId,omitempty"`
	PostId    string `protobuf:"bytes,2,opt,name=postId,proto3" json:"postId,omitempty"`
	Comments  string `protobuf:"bytes,3,opt,name=comments,proto3" json:"comments,omitempty"`
	// contains filtered or unexported fields
}

func (*Comment) Descriptor deprecated

func (*Comment) Descriptor() ([]byte, []int)

Deprecated: Use Comment.ProtoReflect.Descriptor instead.

func (*Comment) GetCommentId

func (x *Comment) GetCommentId() string

func (*Comment) GetComments

func (x *Comment) GetComments() string

func (*Comment) GetPostId

func (x *Comment) GetPostId() string

func (*Comment) ProtoMessage

func (*Comment) ProtoMessage()

func (*Comment) ProtoReflect

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

func (*Comment) Reset

func (x *Comment) Reset()

func (*Comment) String

func (x *Comment) String() string

type CommentData

type CommentData struct {
	Items []*Comment `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*CommentData) Descriptor deprecated

func (*CommentData) Descriptor() ([]byte, []int)

Deprecated: Use CommentData.ProtoReflect.Descriptor instead.

func (*CommentData) GetItems

func (x *CommentData) GetItems() []*Comment

func (*CommentData) ProtoMessage

func (*CommentData) ProtoMessage()

func (*CommentData) ProtoReflect

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

func (*CommentData) Reset

func (x *CommentData) Reset()

func (*CommentData) String

func (x *CommentData) String() string

type CommentServiceClient

type CommentServiceClient interface {
	GetCommentByPost(ctx context.Context, in *GetCommentsRequest, opts ...grpc.CallOption) (*GetCommentsResponse, error)
}

CommentServiceClient is the client API for CommentService 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 CommentServiceServer

type CommentServiceServer interface {
	GetCommentByPost(context.Context, *GetCommentsRequest) (*GetCommentsResponse, error)
}

CommentServiceServer is the server API for CommentService service. All implementations should embed UnimplementedCommentServiceServer for forward compatibility

type GetCommentsRequest

type GetCommentsRequest struct {
	PostId string `protobuf:"bytes,1,opt,name=postId,proto3" json:"postId,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCommentsRequest) Descriptor deprecated

func (*GetCommentsRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetCommentsRequest.ProtoReflect.Descriptor instead.

func (*GetCommentsRequest) GetPostId

func (x *GetCommentsRequest) GetPostId() string

func (*GetCommentsRequest) ProtoMessage

func (*GetCommentsRequest) ProtoMessage()

func (*GetCommentsRequest) ProtoReflect

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

func (*GetCommentsRequest) Reset

func (x *GetCommentsRequest) Reset()

func (*GetCommentsRequest) String

func (x *GetCommentsRequest) String() string

type GetCommentsResponse

type GetCommentsResponse struct {
	Status  bool         `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	Data    *CommentData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	Message string       `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCommentsResponse) Descriptor deprecated

func (*GetCommentsResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetCommentsResponse.ProtoReflect.Descriptor instead.

func (*GetCommentsResponse) GetData

func (x *GetCommentsResponse) GetData() *CommentData

func (*GetCommentsResponse) GetMessage

func (x *GetCommentsResponse) GetMessage() string

func (*GetCommentsResponse) GetStatus

func (x *GetCommentsResponse) GetStatus() bool

func (*GetCommentsResponse) ProtoMessage

func (*GetCommentsResponse) ProtoMessage()

func (*GetCommentsResponse) ProtoReflect

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

func (*GetCommentsResponse) Reset

func (x *GetCommentsResponse) Reset()

func (*GetCommentsResponse) String

func (x *GetCommentsResponse) String() string

type GetPostRequest

type GetPostRequest struct {
	PostId string `protobuf:"bytes,1,opt,name=postId,proto3" json:"postId,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPostRequest) Descriptor deprecated

func (*GetPostRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.

func (*GetPostRequest) GetPostId

func (x *GetPostRequest) GetPostId() string

func (*GetPostRequest) ProtoMessage

func (*GetPostRequest) ProtoMessage()

func (*GetPostRequest) ProtoReflect

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

func (*GetPostRequest) Reset

func (x *GetPostRequest) Reset()

func (*GetPostRequest) String

func (x *GetPostRequest) String() string

type GetPostResponse

type GetPostResponse struct {
	Status  bool   `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	Data    *Post  `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPostResponse) Descriptor deprecated

func (*GetPostResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.

func (*GetPostResponse) GetData

func (x *GetPostResponse) GetData() *Post

func (*GetPostResponse) GetMessage

func (x *GetPostResponse) GetMessage() string

func (*GetPostResponse) GetStatus

func (x *GetPostResponse) GetStatus() bool

func (*GetPostResponse) ProtoMessage

func (*GetPostResponse) ProtoMessage()

func (*GetPostResponse) ProtoReflect

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

func (*GetPostResponse) Reset

func (x *GetPostResponse) Reset()

func (*GetPostResponse) String

func (x *GetPostResponse) String() string

type Post

type Post struct {
	PostId   string `protobuf:"bytes,1,opt,name=postId,proto3" json:"postId,omitempty"`
	UserId   string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"`
	Contents string `protobuf:"bytes,3,opt,name=contents,proto3" json:"contents,omitempty"`
	// contains filtered or unexported fields
}

func (*Post) Descriptor deprecated

func (*Post) Descriptor() ([]byte, []int)

Deprecated: Use Post.ProtoReflect.Descriptor instead.

func (*Post) GetContents

func (x *Post) GetContents() string

func (*Post) GetPostId

func (x *Post) GetPostId() string

func (*Post) GetUserId

func (x *Post) GetUserId() string

func (*Post) ProtoMessage

func (*Post) ProtoMessage()

func (*Post) ProtoReflect

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

func (*Post) Reset

func (x *Post) Reset()

func (*Post) String

func (x *Post) String() string

type PostServiceClient

type PostServiceClient interface {
	GetPostById(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
	AddPost(ctx context.Context, in *AddPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
}

PostServiceClient is the client API for PostService 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 PostServiceServer

type PostServiceServer interface {
	GetPostById(context.Context, *GetPostRequest) (*GetPostResponse, error)
	AddPost(context.Context, *AddPostRequest) (*GetPostResponse, error)
}

PostServiceServer is the server API for PostService service. All implementations should embed UnimplementedPostServiceServer for forward compatibility

type UnimplementedCommentServiceServer

type UnimplementedCommentServiceServer struct {
}

UnimplementedCommentServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedCommentServiceServer) GetCommentByPost

type UnimplementedPostServiceServer

type UnimplementedPostServiceServer struct {
}

UnimplementedPostServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedPostServiceServer) AddPost

func (UnimplementedPostServiceServer) GetPostById

type UnsafeCommentServiceServer

type UnsafeCommentServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeCommentServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CommentServiceServer will result in compilation errors.

type UnsafePostServiceServer

type UnsafePostServiceServer interface {
	// contains filtered or unexported methods
}

UnsafePostServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PostServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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