Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterCommentsManagerServer(s grpc.ServiceRegistrar, srv CommentsManagerServer)
- type Comment
- func (*Comment) Descriptor() ([]byte, []int)deprecated
- func (x *Comment) GetArticleId() string
- func (x *Comment) GetContent() string
- func (x *Comment) GetCreatedAt() *timestamppb.Timestamp
- func (x *Comment) GetId() string
- func (x *Comment) GetOwnerId() string
- func (*Comment) ProtoMessage()
- func (x *Comment) ProtoReflect() protoreflect.Message
- func (x *Comment) Reset()
- func (x *Comment) String() string
- type CommentsManagerClient
- type CommentsManagerServer
- type DeleteRequest
- type DeleteResponse
- type GetCommentByIdRequest
- func (*GetCommentByIdRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetCommentByIdRequest) GetId() string
- func (*GetCommentByIdRequest) ProtoMessage()
- func (x *GetCommentByIdRequest) ProtoReflect() protoreflect.Message
- func (x *GetCommentByIdRequest) Reset()
- func (x *GetCommentByIdRequest) String() string
- type GetCommentByIdResponse
- func (*GetCommentByIdResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetCommentByIdResponse) GetComment() *Comment
- func (*GetCommentByIdResponse) ProtoMessage()
- func (x *GetCommentByIdResponse) ProtoReflect() protoreflect.Message
- func (x *GetCommentByIdResponse) Reset()
- func (x *GetCommentByIdResponse) String() string
- type GetCommentsByArticleIdRequest
- func (*GetCommentsByArticleIdRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetCommentsByArticleIdRequest) GetArticleId() string
- func (*GetCommentsByArticleIdRequest) ProtoMessage()
- func (x *GetCommentsByArticleIdRequest) ProtoReflect() protoreflect.Message
- func (x *GetCommentsByArticleIdRequest) Reset()
- func (x *GetCommentsByArticleIdRequest) String() string
- type GetCommentsByArticleIdResponse
- func (*GetCommentsByArticleIdResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetCommentsByArticleIdResponse) GetComments() []*Comment
- func (*GetCommentsByArticleIdResponse) ProtoMessage()
- func (x *GetCommentsByArticleIdResponse) ProtoReflect() protoreflect.Message
- func (x *GetCommentsByArticleIdResponse) Reset()
- func (x *GetCommentsByArticleIdResponse) String() string
- type InsertRequest
- type InsertResponse
- type UnimplementedCommentsManagerServer
- func (UnimplementedCommentsManagerServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
- func (UnimplementedCommentsManagerServer) GetCommentById(context.Context, *GetCommentByIdRequest) (*GetCommentByIdResponse, error)
- func (UnimplementedCommentsManagerServer) GetCommentsByArticleId(context.Context, *GetCommentsByArticleIdRequest) (*GetCommentsByArticleIdResponse, error)
- func (UnimplementedCommentsManagerServer) Insert(context.Context, *InsertRequest) (*InsertResponse, error)
- type UnsafeCommentsManagerServer
Constants ¶
const ( CommentsManager_GetCommentById_FullMethodName = "/github.chas3air.protos.commentsManager.CommentsManager/GetCommentById" CommentsManager_GetCommentsByArticleId_FullMethodName = "/github.chas3air.protos.commentsManager.CommentsManager/GetCommentsByArticleId" CommentsManager_Insert_FullMethodName = "/github.chas3air.protos.commentsManager.CommentsManager/Insert" CommentsManager_Delete_FullMethodName = "/github.chas3air.protos.commentsManager.CommentsManager/Delete" )
Variables ¶
var CommentsManager_ServiceDesc = grpc.ServiceDesc{ ServiceName: "github.chas3air.protos.commentsManager.CommentsManager", HandlerType: (*CommentsManagerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetCommentById", Handler: _CommentsManager_GetCommentById_Handler, }, { MethodName: "GetCommentsByArticleId", Handler: _CommentsManager_GetCommentsByArticleId_Handler, }, { MethodName: "Insert", Handler: _CommentsManager_Insert_Handler, }, { MethodName: "Delete", Handler: _CommentsManager_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "commentsManager/commentsManager.proto", }
CommentsManager_ServiceDesc is the grpc.ServiceDesc for CommentsManager service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_commentsManager_commentsManager_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCommentsManagerServer ¶
func RegisterCommentsManagerServer(s grpc.ServiceRegistrar, srv CommentsManagerServer)
Types ¶
type Comment ¶
type Comment struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` ArticleId string `protobuf:"bytes,2,opt,name=article_id,json=articleId,proto3" json:"article_id,omitempty"` OwnerId string `protobuf:"bytes,3,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*Comment) Descriptor
deprecated
func (*Comment) GetArticleId ¶
func (*Comment) GetContent ¶
func (*Comment) GetCreatedAt ¶
func (x *Comment) GetCreatedAt() *timestamppb.Timestamp
func (*Comment) GetOwnerId ¶
func (*Comment) ProtoMessage ¶
func (*Comment) ProtoMessage()
func (*Comment) ProtoReflect ¶
func (x *Comment) ProtoReflect() protoreflect.Message
type CommentsManagerClient ¶
type CommentsManagerClient interface { GetCommentById(ctx context.Context, in *GetCommentByIdRequest, opts ...grpc.CallOption) (*GetCommentByIdResponse, error) GetCommentsByArticleId(ctx context.Context, in *GetCommentsByArticleIdRequest, opts ...grpc.CallOption) (*GetCommentsByArticleIdResponse, error) Insert(ctx context.Context, in *InsertRequest, opts ...grpc.CallOption) (*InsertResponse, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) }
CommentsManagerClient is the client API for CommentsManager 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 NewCommentsManagerClient ¶
func NewCommentsManagerClient(cc grpc.ClientConnInterface) CommentsManagerClient
type CommentsManagerServer ¶
type CommentsManagerServer interface { GetCommentById(context.Context, *GetCommentByIdRequest) (*GetCommentByIdResponse, error) GetCommentsByArticleId(context.Context, *GetCommentsByArticleIdRequest) (*GetCommentsByArticleIdResponse, error) Insert(context.Context, *InsertRequest) (*InsertResponse, error) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) // contains filtered or unexported methods }
CommentsManagerServer is the server API for CommentsManager service. All implementations must embed UnimplementedCommentsManagerServer for forward compatibility.
type DeleteRequest ¶ added in v0.3.6
type DeleteRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteRequest) Descriptor
deprecated
added in
v0.3.6
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetId ¶ added in v0.3.6
func (x *DeleteRequest) GetId() string
func (*DeleteRequest) ProtoMessage ¶ added in v0.3.6
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶ added in v0.3.6
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶ added in v0.3.6
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶ added in v0.3.6
func (x *DeleteRequest) String() string
type DeleteResponse ¶ added in v0.3.6
type DeleteResponse struct { Comment *Comment `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"` // contains filtered or unexported fields }
func (*DeleteResponse) Descriptor
deprecated
added in
v0.3.6
func (*DeleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
func (*DeleteResponse) GetComment ¶ added in v0.3.6
func (x *DeleteResponse) GetComment() *Comment
func (*DeleteResponse) ProtoMessage ¶ added in v0.3.6
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) ProtoReflect ¶ added in v0.3.6
func (x *DeleteResponse) ProtoReflect() protoreflect.Message
func (*DeleteResponse) Reset ¶ added in v0.3.6
func (x *DeleteResponse) Reset()
func (*DeleteResponse) String ¶ added in v0.3.6
func (x *DeleteResponse) String() string
type GetCommentByIdRequest ¶ added in v0.3.6
type GetCommentByIdRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetCommentByIdRequest) Descriptor
deprecated
added in
v0.3.6
func (*GetCommentByIdRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetCommentByIdRequest.ProtoReflect.Descriptor instead.
func (*GetCommentByIdRequest) GetId ¶ added in v0.3.6
func (x *GetCommentByIdRequest) GetId() string
func (*GetCommentByIdRequest) ProtoMessage ¶ added in v0.3.6
func (*GetCommentByIdRequest) ProtoMessage()
func (*GetCommentByIdRequest) ProtoReflect ¶ added in v0.3.6
func (x *GetCommentByIdRequest) ProtoReflect() protoreflect.Message
func (*GetCommentByIdRequest) Reset ¶ added in v0.3.6
func (x *GetCommentByIdRequest) Reset()
func (*GetCommentByIdRequest) String ¶ added in v0.3.6
func (x *GetCommentByIdRequest) String() string
type GetCommentByIdResponse ¶ added in v0.3.6
type GetCommentByIdResponse struct { Comment *Comment `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"` // contains filtered or unexported fields }
func (*GetCommentByIdResponse) Descriptor
deprecated
added in
v0.3.6
func (*GetCommentByIdResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetCommentByIdResponse.ProtoReflect.Descriptor instead.
func (*GetCommentByIdResponse) GetComment ¶ added in v0.3.6
func (x *GetCommentByIdResponse) GetComment() *Comment
func (*GetCommentByIdResponse) ProtoMessage ¶ added in v0.3.6
func (*GetCommentByIdResponse) ProtoMessage()
func (*GetCommentByIdResponse) ProtoReflect ¶ added in v0.3.6
func (x *GetCommentByIdResponse) ProtoReflect() protoreflect.Message
func (*GetCommentByIdResponse) Reset ¶ added in v0.3.6
func (x *GetCommentByIdResponse) Reset()
func (*GetCommentByIdResponse) String ¶ added in v0.3.6
func (x *GetCommentByIdResponse) String() string
type GetCommentsByArticleIdRequest ¶
type GetCommentsByArticleIdRequest struct { ArticleId string `protobuf:"bytes,1,opt,name=article_id,json=articleId,proto3" json:"article_id,omitempty"` // contains filtered or unexported fields }
func (*GetCommentsByArticleIdRequest) Descriptor
deprecated
func (*GetCommentsByArticleIdRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetCommentsByArticleIdRequest.ProtoReflect.Descriptor instead.
func (*GetCommentsByArticleIdRequest) GetArticleId ¶
func (x *GetCommentsByArticleIdRequest) GetArticleId() string
func (*GetCommentsByArticleIdRequest) ProtoMessage ¶
func (*GetCommentsByArticleIdRequest) ProtoMessage()
func (*GetCommentsByArticleIdRequest) ProtoReflect ¶
func (x *GetCommentsByArticleIdRequest) ProtoReflect() protoreflect.Message
func (*GetCommentsByArticleIdRequest) Reset ¶
func (x *GetCommentsByArticleIdRequest) Reset()
func (*GetCommentsByArticleIdRequest) String ¶
func (x *GetCommentsByArticleIdRequest) String() string
type GetCommentsByArticleIdResponse ¶
type GetCommentsByArticleIdResponse struct { Comments []*Comment `protobuf:"bytes,1,rep,name=comments,proto3" json:"comments,omitempty"` // contains filtered or unexported fields }
func (*GetCommentsByArticleIdResponse) Descriptor
deprecated
func (*GetCommentsByArticleIdResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetCommentsByArticleIdResponse.ProtoReflect.Descriptor instead.
func (*GetCommentsByArticleIdResponse) GetComments ¶ added in v0.3.6
func (x *GetCommentsByArticleIdResponse) GetComments() []*Comment
func (*GetCommentsByArticleIdResponse) ProtoMessage ¶
func (*GetCommentsByArticleIdResponse) ProtoMessage()
func (*GetCommentsByArticleIdResponse) ProtoReflect ¶
func (x *GetCommentsByArticleIdResponse) ProtoReflect() protoreflect.Message
func (*GetCommentsByArticleIdResponse) Reset ¶
func (x *GetCommentsByArticleIdResponse) Reset()
func (*GetCommentsByArticleIdResponse) String ¶
func (x *GetCommentsByArticleIdResponse) String() string
type InsertRequest ¶ added in v0.3.6
type InsertRequest struct { Comment *Comment `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"` // contains filtered or unexported fields }
func (*InsertRequest) Descriptor
deprecated
added in
v0.3.6
func (*InsertRequest) Descriptor() ([]byte, []int)
Deprecated: Use InsertRequest.ProtoReflect.Descriptor instead.
func (*InsertRequest) GetComment ¶ added in v0.3.6
func (x *InsertRequest) GetComment() *Comment
func (*InsertRequest) ProtoMessage ¶ added in v0.3.6
func (*InsertRequest) ProtoMessage()
func (*InsertRequest) ProtoReflect ¶ added in v0.3.6
func (x *InsertRequest) ProtoReflect() protoreflect.Message
func (*InsertRequest) Reset ¶ added in v0.3.6
func (x *InsertRequest) Reset()
func (*InsertRequest) String ¶ added in v0.3.6
func (x *InsertRequest) String() string
type InsertResponse ¶ added in v0.3.6
type InsertResponse struct { Comment *Comment `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"` // contains filtered or unexported fields }
func (*InsertResponse) Descriptor
deprecated
added in
v0.3.6
func (*InsertResponse) Descriptor() ([]byte, []int)
Deprecated: Use InsertResponse.ProtoReflect.Descriptor instead.
func (*InsertResponse) GetComment ¶ added in v0.3.6
func (x *InsertResponse) GetComment() *Comment
func (*InsertResponse) ProtoMessage ¶ added in v0.3.6
func (*InsertResponse) ProtoMessage()
func (*InsertResponse) ProtoReflect ¶ added in v0.3.6
func (x *InsertResponse) ProtoReflect() protoreflect.Message
func (*InsertResponse) Reset ¶ added in v0.3.6
func (x *InsertResponse) Reset()
func (*InsertResponse) String ¶ added in v0.3.6
func (x *InsertResponse) String() string
type UnimplementedCommentsManagerServer ¶
type UnimplementedCommentsManagerServer struct{}
UnimplementedCommentsManagerServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedCommentsManagerServer) Delete ¶ added in v0.3.6
func (UnimplementedCommentsManagerServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
func (UnimplementedCommentsManagerServer) GetCommentById ¶ added in v0.3.6
func (UnimplementedCommentsManagerServer) GetCommentById(context.Context, *GetCommentByIdRequest) (*GetCommentByIdResponse, error)
func (UnimplementedCommentsManagerServer) GetCommentsByArticleId ¶
func (UnimplementedCommentsManagerServer) GetCommentsByArticleId(context.Context, *GetCommentsByArticleIdRequest) (*GetCommentsByArticleIdResponse, error)
func (UnimplementedCommentsManagerServer) Insert ¶ added in v0.3.6
func (UnimplementedCommentsManagerServer) Insert(context.Context, *InsertRequest) (*InsertResponse, error)
type UnsafeCommentsManagerServer ¶
type UnsafeCommentsManagerServer interface {
// contains filtered or unexported methods
}
UnsafeCommentsManagerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CommentsManagerServer will result in compilation errors.