Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterCommentServiceHTTPServer(s *http.Server, srv CommentServiceHTTPServer)
- func RegisterCommentServiceServer(s grpc.ServiceRegistrar, srv CommentServiceServer)
- type Comment
- func (*Comment) Descriptor() ([]byte, []int)deprecated
- func (x *Comment) GetContent() string
- func (x *Comment) GetCreateDate() string
- func (x *Comment) GetId() uint32
- func (x *Comment) GetUser() *User
- func (*Comment) ProtoMessage()
- func (x *Comment) ProtoReflect() protoreflect.Message
- func (x *Comment) Reset()
- func (x *Comment) String() string
- func (m *Comment) Validate() error
- func (m *Comment) ValidateAll() error
- type CommentActionReply
- func (*CommentActionReply) Descriptor() ([]byte, []int)deprecated
- func (x *CommentActionReply) GetComment() *Comment
- func (x *CommentActionReply) GetStatusCode() int32
- func (x *CommentActionReply) GetStatusMsg() string
- func (*CommentActionReply) ProtoMessage()
- func (x *CommentActionReply) ProtoReflect() protoreflect.Message
- func (x *CommentActionReply) Reset()
- func (x *CommentActionReply) String() string
- func (m *CommentActionReply) Validate() error
- func (m *CommentActionReply) ValidateAll() error
- type CommentActionReplyMultiError
- type CommentActionReplyValidationError
- func (e CommentActionReplyValidationError) Cause() error
- func (e CommentActionReplyValidationError) Error() string
- func (e CommentActionReplyValidationError) ErrorName() string
- func (e CommentActionReplyValidationError) Field() string
- func (e CommentActionReplyValidationError) Key() bool
- func (e CommentActionReplyValidationError) Reason() string
- type CommentActionRequest
- func (*CommentActionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CommentActionRequest) GetActionType() uint32
- func (x *CommentActionRequest) GetCommentId() uint32
- func (x *CommentActionRequest) GetCommentText() string
- func (x *CommentActionRequest) GetToken() string
- func (x *CommentActionRequest) GetVideoId() uint32
- func (*CommentActionRequest) ProtoMessage()
- func (x *CommentActionRequest) ProtoReflect() protoreflect.Message
- func (x *CommentActionRequest) Reset()
- func (x *CommentActionRequest) String() string
- func (m *CommentActionRequest) Validate() error
- func (m *CommentActionRequest) ValidateAll() error
- type CommentActionRequestMultiError
- type CommentActionRequestValidationError
- func (e CommentActionRequestValidationError) Cause() error
- func (e CommentActionRequestValidationError) Error() string
- func (e CommentActionRequestValidationError) ErrorName() string
- func (e CommentActionRequestValidationError) Field() string
- func (e CommentActionRequestValidationError) Key() bool
- func (e CommentActionRequestValidationError) Reason() string
- type CommentListReply
- func (*CommentListReply) Descriptor() ([]byte, []int)deprecated
- func (x *CommentListReply) GetCommentList() []*Comment
- func (x *CommentListReply) GetStatusCode() int32
- func (x *CommentListReply) GetStatusMsg() string
- func (*CommentListReply) ProtoMessage()
- func (x *CommentListReply) ProtoReflect() protoreflect.Message
- func (x *CommentListReply) Reset()
- func (x *CommentListReply) String() string
- func (m *CommentListReply) Validate() error
- func (m *CommentListReply) ValidateAll() error
- type CommentListReplyMultiError
- type CommentListReplyValidationError
- func (e CommentListReplyValidationError) Cause() error
- func (e CommentListReplyValidationError) Error() string
- func (e CommentListReplyValidationError) ErrorName() string
- func (e CommentListReplyValidationError) Field() string
- func (e CommentListReplyValidationError) Key() bool
- func (e CommentListReplyValidationError) Reason() string
- type CommentListRequest
- func (*CommentListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CommentListRequest) GetToken() string
- func (x *CommentListRequest) GetVideoId() uint32
- func (*CommentListRequest) ProtoMessage()
- func (x *CommentListRequest) ProtoReflect() protoreflect.Message
- func (x *CommentListRequest) Reset()
- func (x *CommentListRequest) String() string
- func (m *CommentListRequest) Validate() error
- func (m *CommentListRequest) ValidateAll() error
- type CommentListRequestMultiError
- type CommentListRequestValidationError
- func (e CommentListRequestValidationError) Cause() error
- func (e CommentListRequestValidationError) Error() string
- func (e CommentListRequestValidationError) ErrorName() string
- func (e CommentListRequestValidationError) Field() string
- func (e CommentListRequestValidationError) Key() bool
- func (e CommentListRequestValidationError) Reason() string
- type CommentMultiError
- type CommentServiceClient
- type CommentServiceHTTPClient
- type CommentServiceHTTPClientImpl
- func (c *CommentServiceHTTPClientImpl) CommentAction(ctx context.Context, in *CommentActionRequest, opts ...http.CallOption) (*CommentActionReply, error)
- func (c *CommentServiceHTTPClientImpl) GetCommentList(ctx context.Context, in *CommentListRequest, opts ...http.CallOption) (*CommentListReply, error)
- type CommentServiceHTTPServer
- type CommentServiceServer
- type CommentValidationError
- type UnimplementedCommentServiceServer
- type UnsafeCommentServiceServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAvatar() string
- func (x *User) GetBackgroundImage() string
- func (x *User) GetFavoriteCount() uint32
- func (x *User) GetFollowCount() uint32
- func (x *User) GetFollowerCount() uint32
- func (x *User) GetId() uint32
- func (x *User) GetIsFollow() bool
- func (x *User) GetName() string
- func (x *User) GetSignature() string
- func (x *User) GetTotalFavorited() uint32
- func (x *User) GetWorkCount() uint32
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- func (m *User) Validate() error
- func (m *User) ValidateAll() error
- type UserMultiError
- type UserValidationError
Constants ¶
const ( CommentService_GetCommentList_FullMethodName = "/comment.service.v1.CommentService/GetCommentList" CommentService_CommentAction_FullMethodName = "/comment.service.v1.CommentService/CommentAction" )
const OperationCommentServiceCommentAction = "/comment.service.v1.CommentService/CommentAction"
const OperationCommentServiceGetCommentList = "/comment.service.v1.CommentService/GetCommentList"
Variables ¶
var CommentService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "comment.service.v1.CommentService", HandlerType: (*CommentServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetCommentList", Handler: _CommentService_GetCommentList_Handler, }, { MethodName: "CommentAction", Handler: _CommentService_CommentAction_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "comment/service/v1/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_comment_service_v1_comment_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCommentServiceHTTPServer ¶
func RegisterCommentServiceHTTPServer(s *http.Server, srv CommentServiceHTTPServer)
func RegisterCommentServiceServer ¶
func RegisterCommentServiceServer(s grpc.ServiceRegistrar, srv CommentServiceServer)
Types ¶
type Comment ¶
type Comment struct { // 视频评论id Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 评论用户信息 User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` // 评论内容 Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` // 评论发布日期,格式 mm-dd CreateDate string `protobuf:"bytes,4,opt,name=create_date,proto3" json:"create_date,omitempty"` // contains filtered or unexported fields }
func (*Comment) Descriptor
deprecated
func (*Comment) GetContent ¶
func (*Comment) GetCreateDate ¶
func (*Comment) ProtoMessage ¶
func (*Comment) ProtoMessage()
func (*Comment) ProtoReflect ¶
func (x *Comment) ProtoReflect() protoreflect.Message
func (*Comment) Validate ¶
Validate checks the field values on Comment with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Comment) ValidateAll ¶
ValidateAll checks the field values on Comment with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CommentMultiError, or nil if none found.
type CommentActionReply ¶
type CommentActionReply struct { // 状态码,0-成功,其他值-失败 StatusCode int32 `protobuf:"varint,1,opt,name=status_code,proto3" json:"status_code,omitempty"` // 返回状态描述 StatusMsg string `protobuf:"bytes,2,opt,name=status_msg,proto3" json:"status_msg,omitempty"` // 评论成功返回评论内容,不需要重新拉取整个列表 Comment *Comment `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"` // contains filtered or unexported fields }
func (*CommentActionReply) Descriptor
deprecated
func (*CommentActionReply) Descriptor() ([]byte, []int)
Deprecated: Use CommentActionReply.ProtoReflect.Descriptor instead.
func (*CommentActionReply) GetComment ¶
func (x *CommentActionReply) GetComment() *Comment
func (*CommentActionReply) GetStatusCode ¶
func (x *CommentActionReply) GetStatusCode() int32
func (*CommentActionReply) GetStatusMsg ¶
func (x *CommentActionReply) GetStatusMsg() string
func (*CommentActionReply) ProtoMessage ¶
func (*CommentActionReply) ProtoMessage()
func (*CommentActionReply) ProtoReflect ¶
func (x *CommentActionReply) ProtoReflect() protoreflect.Message
func (*CommentActionReply) Reset ¶
func (x *CommentActionReply) Reset()
func (*CommentActionReply) String ¶
func (x *CommentActionReply) String() string
func (*CommentActionReply) Validate ¶
func (m *CommentActionReply) Validate() error
Validate checks the field values on CommentActionReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*CommentActionReply) ValidateAll ¶
func (m *CommentActionReply) ValidateAll() error
ValidateAll checks the field values on CommentActionReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CommentActionReplyMultiError, or nil if none found.
type CommentActionReplyMultiError ¶
type CommentActionReplyMultiError []error
CommentActionReplyMultiError is an error wrapping multiple validation errors returned by CommentActionReply.ValidateAll() if the designated constraints aren't met.
func (CommentActionReplyMultiError) AllErrors ¶
func (m CommentActionReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CommentActionReplyMultiError) Error ¶
func (m CommentActionReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CommentActionReplyValidationError ¶
type CommentActionReplyValidationError struct {
// contains filtered or unexported fields
}
CommentActionReplyValidationError is the validation error returned by CommentActionReply.Validate if the designated constraints aren't met.
func (CommentActionReplyValidationError) Cause ¶
func (e CommentActionReplyValidationError) Cause() error
Cause function returns cause value.
func (CommentActionReplyValidationError) Error ¶
func (e CommentActionReplyValidationError) Error() string
Error satisfies the builtin error interface
func (CommentActionReplyValidationError) ErrorName ¶
func (e CommentActionReplyValidationError) ErrorName() string
ErrorName returns error name.
func (CommentActionReplyValidationError) Field ¶
func (e CommentActionReplyValidationError) Field() string
Field function returns field value.
func (CommentActionReplyValidationError) Key ¶
func (e CommentActionReplyValidationError) Key() bool
Key function returns key value.
func (CommentActionReplyValidationError) Reason ¶
func (e CommentActionReplyValidationError) Reason() string
Reason function returns reason value.
type CommentActionRequest ¶
type CommentActionRequest struct { // 用户鉴权token Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // 视频id VideoId uint32 `protobuf:"varint,2,opt,name=video_id,json=videoId,proto3" json:"video_id,omitempty"` // 1-发布评论,2-删除评论 ActionType uint32 `protobuf:"varint,3,opt,name=action_type,json=actionType,proto3" json:"action_type,omitempty"` // 用户填写的评论内容,在action_type=1的时候使用 CommentText string `protobuf:"bytes,4,opt,name=comment_text,json=commentText,proto3" json:"comment_text,omitempty"` // 要删除的评论id,在action_type=2的时候使用 CommentId uint32 `protobuf:"varint,5,opt,name=comment_id,json=commentId,proto3" json:"comment_id,omitempty"` // contains filtered or unexported fields }
func (*CommentActionRequest) Descriptor
deprecated
func (*CommentActionRequest) Descriptor() ([]byte, []int)
Deprecated: Use CommentActionRequest.ProtoReflect.Descriptor instead.
func (*CommentActionRequest) GetActionType ¶
func (x *CommentActionRequest) GetActionType() uint32
func (*CommentActionRequest) GetCommentId ¶
func (x *CommentActionRequest) GetCommentId() uint32
func (*CommentActionRequest) GetCommentText ¶
func (x *CommentActionRequest) GetCommentText() string
func (*CommentActionRequest) GetToken ¶
func (x *CommentActionRequest) GetToken() string
func (*CommentActionRequest) GetVideoId ¶
func (x *CommentActionRequest) GetVideoId() uint32
func (*CommentActionRequest) ProtoMessage ¶
func (*CommentActionRequest) ProtoMessage()
func (*CommentActionRequest) ProtoReflect ¶
func (x *CommentActionRequest) ProtoReflect() protoreflect.Message
func (*CommentActionRequest) Reset ¶
func (x *CommentActionRequest) Reset()
func (*CommentActionRequest) String ¶
func (x *CommentActionRequest) String() string
func (*CommentActionRequest) Validate ¶
func (m *CommentActionRequest) Validate() error
Validate checks the field values on CommentActionRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*CommentActionRequest) ValidateAll ¶
func (m *CommentActionRequest) ValidateAll() error
ValidateAll checks the field values on CommentActionRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CommentActionRequestMultiError, or nil if none found.
type CommentActionRequestMultiError ¶
type CommentActionRequestMultiError []error
CommentActionRequestMultiError is an error wrapping multiple validation errors returned by CommentActionRequest.ValidateAll() if the designated constraints aren't met.
func (CommentActionRequestMultiError) AllErrors ¶
func (m CommentActionRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CommentActionRequestMultiError) Error ¶
func (m CommentActionRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CommentActionRequestValidationError ¶
type CommentActionRequestValidationError struct {
// contains filtered or unexported fields
}
CommentActionRequestValidationError is the validation error returned by CommentActionRequest.Validate if the designated constraints aren't met.
func (CommentActionRequestValidationError) Cause ¶
func (e CommentActionRequestValidationError) Cause() error
Cause function returns cause value.
func (CommentActionRequestValidationError) Error ¶
func (e CommentActionRequestValidationError) Error() string
Error satisfies the builtin error interface
func (CommentActionRequestValidationError) ErrorName ¶
func (e CommentActionRequestValidationError) ErrorName() string
ErrorName returns error name.
func (CommentActionRequestValidationError) Field ¶
func (e CommentActionRequestValidationError) Field() string
Field function returns field value.
func (CommentActionRequestValidationError) Key ¶
func (e CommentActionRequestValidationError) Key() bool
Key function returns key value.
func (CommentActionRequestValidationError) Reason ¶
func (e CommentActionRequestValidationError) Reason() string
Reason function returns reason value.
type CommentListReply ¶
type CommentListReply struct { // 状态码,0-成功,其他值-失败 StatusCode int32 `protobuf:"varint,1,opt,name=status_code,proto3" json:"status_code,omitempty"` // 返回状态描述 StatusMsg string `protobuf:"bytes,2,opt,name=status_msg,proto3" json:"status_msg,omitempty"` // 评论列表 CommentList []*Comment `protobuf:"bytes,3,rep,name=comment_list,proto3" json:"comment_list,omitempty"` // contains filtered or unexported fields }
func (*CommentListReply) Descriptor
deprecated
func (*CommentListReply) Descriptor() ([]byte, []int)
Deprecated: Use CommentListReply.ProtoReflect.Descriptor instead.
func (*CommentListReply) GetCommentList ¶
func (x *CommentListReply) GetCommentList() []*Comment
func (*CommentListReply) GetStatusCode ¶
func (x *CommentListReply) GetStatusCode() int32
func (*CommentListReply) GetStatusMsg ¶
func (x *CommentListReply) GetStatusMsg() string
func (*CommentListReply) ProtoMessage ¶
func (*CommentListReply) ProtoMessage()
func (*CommentListReply) ProtoReflect ¶
func (x *CommentListReply) ProtoReflect() protoreflect.Message
func (*CommentListReply) Reset ¶
func (x *CommentListReply) Reset()
func (*CommentListReply) String ¶
func (x *CommentListReply) String() string
func (*CommentListReply) Validate ¶
func (m *CommentListReply) Validate() error
Validate checks the field values on CommentListReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*CommentListReply) ValidateAll ¶
func (m *CommentListReply) ValidateAll() error
ValidateAll checks the field values on CommentListReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CommentListReplyMultiError, or nil if none found.
type CommentListReplyMultiError ¶
type CommentListReplyMultiError []error
CommentListReplyMultiError is an error wrapping multiple validation errors returned by CommentListReply.ValidateAll() if the designated constraints aren't met.
func (CommentListReplyMultiError) AllErrors ¶
func (m CommentListReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CommentListReplyMultiError) Error ¶
func (m CommentListReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CommentListReplyValidationError ¶
type CommentListReplyValidationError struct {
// contains filtered or unexported fields
}
CommentListReplyValidationError is the validation error returned by CommentListReply.Validate if the designated constraints aren't met.
func (CommentListReplyValidationError) Cause ¶
func (e CommentListReplyValidationError) Cause() error
Cause function returns cause value.
func (CommentListReplyValidationError) Error ¶
func (e CommentListReplyValidationError) Error() string
Error satisfies the builtin error interface
func (CommentListReplyValidationError) ErrorName ¶
func (e CommentListReplyValidationError) ErrorName() string
ErrorName returns error name.
func (CommentListReplyValidationError) Field ¶
func (e CommentListReplyValidationError) Field() string
Field function returns field value.
func (CommentListReplyValidationError) Key ¶
func (e CommentListReplyValidationError) Key() bool
Key function returns key value.
func (CommentListReplyValidationError) Reason ¶
func (e CommentListReplyValidationError) Reason() string
Reason function returns reason value.
type CommentListRequest ¶
type CommentListRequest struct { // 用户鉴权token Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // 视频id VideoId uint32 `protobuf:"varint,2,opt,name=video_id,json=videoId,proto3" json:"video_id,omitempty"` // contains filtered or unexported fields }
func (*CommentListRequest) Descriptor
deprecated
func (*CommentListRequest) Descriptor() ([]byte, []int)
Deprecated: Use CommentListRequest.ProtoReflect.Descriptor instead.
func (*CommentListRequest) GetToken ¶
func (x *CommentListRequest) GetToken() string
func (*CommentListRequest) GetVideoId ¶
func (x *CommentListRequest) GetVideoId() uint32
func (*CommentListRequest) ProtoMessage ¶
func (*CommentListRequest) ProtoMessage()
func (*CommentListRequest) ProtoReflect ¶
func (x *CommentListRequest) ProtoReflect() protoreflect.Message
func (*CommentListRequest) Reset ¶
func (x *CommentListRequest) Reset()
func (*CommentListRequest) String ¶
func (x *CommentListRequest) String() string
func (*CommentListRequest) Validate ¶
func (m *CommentListRequest) Validate() error
Validate checks the field values on CommentListRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*CommentListRequest) ValidateAll ¶
func (m *CommentListRequest) ValidateAll() error
ValidateAll checks the field values on CommentListRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CommentListRequestMultiError, or nil if none found.
type CommentListRequestMultiError ¶
type CommentListRequestMultiError []error
CommentListRequestMultiError is an error wrapping multiple validation errors returned by CommentListRequest.ValidateAll() if the designated constraints aren't met.
func (CommentListRequestMultiError) AllErrors ¶
func (m CommentListRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CommentListRequestMultiError) Error ¶
func (m CommentListRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CommentListRequestValidationError ¶
type CommentListRequestValidationError struct {
// contains filtered or unexported fields
}
CommentListRequestValidationError is the validation error returned by CommentListRequest.Validate if the designated constraints aren't met.
func (CommentListRequestValidationError) Cause ¶
func (e CommentListRequestValidationError) Cause() error
Cause function returns cause value.
func (CommentListRequestValidationError) Error ¶
func (e CommentListRequestValidationError) Error() string
Error satisfies the builtin error interface
func (CommentListRequestValidationError) ErrorName ¶
func (e CommentListRequestValidationError) ErrorName() string
ErrorName returns error name.
func (CommentListRequestValidationError) Field ¶
func (e CommentListRequestValidationError) Field() string
Field function returns field value.
func (CommentListRequestValidationError) Key ¶
func (e CommentListRequestValidationError) Key() bool
Key function returns key value.
func (CommentListRequestValidationError) Reason ¶
func (e CommentListRequestValidationError) Reason() string
Reason function returns reason value.
type CommentMultiError ¶
type CommentMultiError []error
CommentMultiError is an error wrapping multiple validation errors returned by Comment.ValidateAll() if the designated constraints aren't met.
func (CommentMultiError) AllErrors ¶
func (m CommentMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CommentMultiError) Error ¶
func (m CommentMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CommentServiceClient ¶
type CommentServiceClient interface { // GetCommentList 获取评论列表 GetCommentList(ctx context.Context, in *CommentListRequest, opts ...grpc.CallOption) (*CommentListReply, error) // CommentAction 发布评论或者删除评论 CommentAction(ctx context.Context, in *CommentActionRequest, opts ...grpc.CallOption) (*CommentActionReply, 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 CommentServiceHTTPClient ¶
type CommentServiceHTTPClient interface { CommentAction(ctx context.Context, req *CommentActionRequest, opts ...http.CallOption) (rsp *CommentActionReply, err error) GetCommentList(ctx context.Context, req *CommentListRequest, opts ...http.CallOption) (rsp *CommentListReply, err error) }
func NewCommentServiceHTTPClient ¶
func NewCommentServiceHTTPClient(client *http.Client) CommentServiceHTTPClient
type CommentServiceHTTPClientImpl ¶
type CommentServiceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*CommentServiceHTTPClientImpl) CommentAction ¶
func (c *CommentServiceHTTPClientImpl) CommentAction(ctx context.Context, in *CommentActionRequest, opts ...http.CallOption) (*CommentActionReply, error)
func (*CommentServiceHTTPClientImpl) GetCommentList ¶
func (c *CommentServiceHTTPClientImpl) GetCommentList(ctx context.Context, in *CommentListRequest, opts ...http.CallOption) (*CommentListReply, error)
type CommentServiceHTTPServer ¶
type CommentServiceHTTPServer interface { // CommentAction CommentAction 发布评论或者删除评论 CommentAction(context.Context, *CommentActionRequest) (*CommentActionReply, error) // GetCommentList GetCommentList 获取评论列表 GetCommentList(context.Context, *CommentListRequest) (*CommentListReply, error) }
type CommentServiceServer ¶
type CommentServiceServer interface { // GetCommentList 获取评论列表 GetCommentList(context.Context, *CommentListRequest) (*CommentListReply, error) // CommentAction 发布评论或者删除评论 CommentAction(context.Context, *CommentActionRequest) (*CommentActionReply, error) // contains filtered or unexported methods }
CommentServiceServer is the server API for CommentService service. All implementations must embed UnimplementedCommentServiceServer for forward compatibility
type CommentValidationError ¶
type CommentValidationError struct {
// contains filtered or unexported fields
}
CommentValidationError is the validation error returned by Comment.Validate if the designated constraints aren't met.
func (CommentValidationError) Cause ¶
func (e CommentValidationError) Cause() error
Cause function returns cause value.
func (CommentValidationError) Error ¶
func (e CommentValidationError) Error() string
Error satisfies the builtin error interface
func (CommentValidationError) ErrorName ¶
func (e CommentValidationError) ErrorName() string
ErrorName returns error name.
func (CommentValidationError) Field ¶
func (e CommentValidationError) Field() string
Field function returns field value.
func (CommentValidationError) Key ¶
func (e CommentValidationError) Key() bool
Key function returns key value.
func (CommentValidationError) Reason ¶
func (e CommentValidationError) Reason() string
Reason function returns reason value.
type UnimplementedCommentServiceServer ¶
type UnimplementedCommentServiceServer struct { }
UnimplementedCommentServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCommentServiceServer) CommentAction ¶
func (UnimplementedCommentServiceServer) CommentAction(context.Context, *CommentActionRequest) (*CommentActionReply, error)
func (UnimplementedCommentServiceServer) GetCommentList ¶
func (UnimplementedCommentServiceServer) GetCommentList(context.Context, *CommentListRequest) (*CommentListReply, 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 User ¶
type User struct { // 用户id Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 用户名称 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 关注总数 FollowCount uint32 `protobuf:"varint,3,opt,name=follow_count,proto3" json:"follow_count,omitempty"` // 粉丝总数 FollowerCount uint32 `protobuf:"varint,4,opt,name=follower_count,proto3" json:"follower_count,omitempty"` // true-已关注,false-未关注 IsFollow bool `protobuf:"varint,5,opt,name=is_follow,proto3" json:"is_follow,omitempty"` // 用户头像 Avatar string `protobuf:"bytes,6,opt,name=avatar,proto3" json:"avatar,omitempty"` // 用户个人页顶部大图 BackgroundImage string `protobuf:"bytes,7,opt,name=background_image,proto3" json:"background_image,omitempty"` // 个人简介 Signature string `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"` // 获赞数量 TotalFavorited uint32 `protobuf:"varint,9,opt,name=total_favorited,proto3" json:"total_favorited,omitempty"` // 作品数量 WorkCount uint32 `protobuf:"varint,10,opt,name=work_count,proto3" json:"work_count,omitempty"` // 点赞数量 FavoriteCount uint32 `protobuf:"varint,11,opt,name=favorite_count,proto3" json:"favorite_count,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetBackgroundImage ¶
func (*User) GetFavoriteCount ¶
func (*User) GetFollowCount ¶
func (*User) GetFollowerCount ¶
func (*User) GetIsFollow ¶
func (*User) GetSignature ¶
func (*User) GetTotalFavorited ¶
func (*User) GetWorkCount ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
func (*User) Validate ¶
Validate checks the field values on User with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*User) ValidateAll ¶
ValidateAll checks the field values on User with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserMultiError, or nil if none found.
type UserMultiError ¶
type UserMultiError []error
UserMultiError is an error wrapping multiple validation errors returned by User.ValidateAll() if the designated constraints aren't met.
func (UserMultiError) AllErrors ¶
func (m UserMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserMultiError) Error ¶
func (m UserMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserValidationError ¶
type UserValidationError struct {
// contains filtered or unexported fields
}
UserValidationError is the validation error returned by User.Validate if the designated constraints aren't met.
func (UserValidationError) Cause ¶
func (e UserValidationError) Cause() error
Cause function returns cause value.
func (UserValidationError) Error ¶
func (e UserValidationError) Error() string
Error satisfies the builtin error interface
func (UserValidationError) ErrorName ¶
func (e UserValidationError) ErrorName() string
ErrorName returns error name.
func (UserValidationError) Field ¶
func (e UserValidationError) Field() string
Field function returns field value.
func (UserValidationError) Key ¶
func (e UserValidationError) Key() bool
Key function returns key value.
func (UserValidationError) Reason ¶
func (e UserValidationError) Reason() string
Reason function returns reason value.