Documentation ¶
Index ¶
- Variables
- func RegisterCommentServiceServer(s grpc.ServiceRegistrar, srv CommentServiceServer)
- func RegisterPostServiceServer(s grpc.ServiceRegistrar, srv PostServiceServer)
- type AddPostRequest
- func (*AddPostRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddPostRequest) GetContents() string
- func (x *AddPostRequest) GetUserId() string
- func (*AddPostRequest) ProtoMessage()
- func (x *AddPostRequest) ProtoReflect() protoreflect.Message
- func (x *AddPostRequest) Reset()
- func (x *AddPostRequest) String() string
- type Comment
- func (*Comment) Descriptor() ([]byte, []int)deprecated
- func (x *Comment) GetCommentId() string
- func (x *Comment) GetComments() string
- func (x *Comment) GetPostId() string
- func (*Comment) ProtoMessage()
- func (x *Comment) ProtoReflect() protoreflect.Message
- func (x *Comment) Reset()
- func (x *Comment) String() string
- type CommentData
- type CommentServiceClient
- type CommentServiceServer
- type GetCommentsRequest
- func (*GetCommentsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetCommentsRequest) GetPostId() string
- func (*GetCommentsRequest) ProtoMessage()
- func (x *GetCommentsRequest) ProtoReflect() protoreflect.Message
- func (x *GetCommentsRequest) Reset()
- func (x *GetCommentsRequest) String() string
- type GetCommentsResponse
- func (*GetCommentsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetCommentsResponse) GetData() *CommentData
- func (x *GetCommentsResponse) GetMessage() string
- func (x *GetCommentsResponse) GetStatus() bool
- func (*GetCommentsResponse) ProtoMessage()
- func (x *GetCommentsResponse) ProtoReflect() protoreflect.Message
- func (x *GetCommentsResponse) Reset()
- func (x *GetCommentsResponse) String() string
- type GetPostRequest
- type GetPostResponse
- func (*GetPostResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetPostResponse) GetData() *Post
- func (x *GetPostResponse) GetMessage() string
- func (x *GetPostResponse) GetStatus() bool
- func (*GetPostResponse) ProtoMessage()
- func (x *GetPostResponse) ProtoReflect() protoreflect.Message
- func (x *GetPostResponse) Reset()
- func (x *GetPostResponse) String() string
- type Post
- type PostServiceClient
- type PostServiceServer
- type UnimplementedCommentServiceServer
- type UnimplementedPostServiceServer
- type UnsafeCommentServiceServer
- type UnsafePostServiceServer
Constants ¶
This section is empty.
Variables ¶
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)
var File_protos_comment_proto protoreflect.FileDescriptor
var File_protos_post_proto protoreflect.FileDescriptor
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) GetCommentId ¶
func (*Comment) GetComments ¶
func (*Comment) ProtoMessage ¶
func (*Comment) ProtoMessage()
func (*Comment) ProtoReflect ¶
func (x *Comment) ProtoReflect() protoreflect.Message
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.
func NewCommentServiceClient ¶
func NewCommentServiceClient(cc grpc.ClientConnInterface) CommentServiceClient
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) GetContents ¶
func (*Post) ProtoMessage ¶
func (*Post) ProtoMessage()
func (*Post) ProtoReflect ¶
func (x *Post) ProtoReflect() protoreflect.Message
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.
func NewPostServiceClient ¶
func NewPostServiceClient(cc grpc.ClientConnInterface) PostServiceClient
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 ¶
func (UnimplementedCommentServiceServer) GetCommentByPost(context.Context, *GetCommentsRequest) (*GetCommentsResponse, error)
type UnimplementedPostServiceServer ¶
type UnimplementedPostServiceServer struct { }
UnimplementedPostServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedPostServiceServer) AddPost ¶
func (UnimplementedPostServiceServer) AddPost(context.Context, *AddPostRequest) (*GetPostResponse, error)
func (UnimplementedPostServiceServer) GetPostById ¶
func (UnimplementedPostServiceServer) GetPostById(context.Context, *GetPostRequest) (*GetPostResponse, error)
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.