comment

package
v0.0.0-...-f9b5f64 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_comment_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Comment

type Comment struct {
	Id         int64      `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`                                   // 评论的视频id
	User       *user.User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`                                // 评论用户信息
	Content    string     `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`                          // 评论内容
	CreateDate string     `protobuf:"bytes,4,opt,name=create_date,json=createDate,proto3" json:"create_date,omitempty"`  // 评论发布日期,格式mm-dd
	LikeCount  int64      `protobuf:"varint,5,opt,name=like_count,json=likeCount,proto3" json:"like_count,omitempty"`    // 该评论点赞数量
	TeaseCount int64      `protobuf:"varint,6,opt,name=tease_count,json=teaseCount,proto3" json:"tease_count,omitempty"` // 该评论点踩数量
	// contains filtered or unexported fields
}

func (*Comment) Descriptor deprecated

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

Deprecated: Use Comment.ProtoReflect.Descriptor instead.

func (*Comment) FastRead

func (x *Comment) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

func (*Comment) FastWrite

func (x *Comment) FastWrite(buf []byte) (offset int)

func (*Comment) GetContent

func (x *Comment) GetContent() string

func (*Comment) GetCreateDate

func (x *Comment) GetCreateDate() string

func (*Comment) GetId

func (x *Comment) GetId() int64

func (*Comment) GetLikeCount

func (x *Comment) GetLikeCount() int64

func (*Comment) GetTeaseCount

func (x *Comment) GetTeaseCount() int64

func (*Comment) GetUser

func (x *Comment) GetUser() *user.User

func (*Comment) ProtoMessage

func (*Comment) ProtoMessage()

func (*Comment) ProtoReflect

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

func (*Comment) Reset

func (x *Comment) Reset()

func (*Comment) Size

func (x *Comment) Size() (n int)

func (*Comment) String

func (x *Comment) String() string

type CommentActionRequest

type CommentActionRequest struct {
	Token       string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`                                //用户鉴权token
	VideoId     int64  `protobuf:"varint,2,opt,name=video_id,json=videoId,proto3" json:"video_id,omitempty"`            //评论的视频id
	ActionType  int32  `protobuf:"varint,3,opt,name=action_type,json=actionType,proto3" json:"action_type,omitempty"`   //1-发布评论,2-删除评论
	CommentText string `protobuf:"bytes,4,opt,name=comment_text,json=commentText,proto3" json:"comment_text,omitempty"` //用户填写的评论内容,action_type=1时使用
	CommentId   int64  `protobuf:"varint,5,opt,name=comment_id,json=commentId,proto3" json:"comment_id,omitempty"`      //要删除的评论id,action_type=2时使用
	// contains filtered or unexported fields
}

===========================发布or删除评论==================================

func (*CommentActionRequest) Descriptor deprecated

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

Deprecated: Use CommentActionRequest.ProtoReflect.Descriptor instead.

func (*CommentActionRequest) FastRead

func (x *CommentActionRequest) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

func (*CommentActionRequest) FastWrite

func (x *CommentActionRequest) FastWrite(buf []byte) (offset int)

func (*CommentActionRequest) GetActionType

func (x *CommentActionRequest) GetActionType() int32

func (*CommentActionRequest) GetCommentId

func (x *CommentActionRequest) GetCommentId() int64

func (*CommentActionRequest) GetCommentText

func (x *CommentActionRequest) GetCommentText() string

func (*CommentActionRequest) GetToken

func (x *CommentActionRequest) GetToken() string

func (*CommentActionRequest) GetVideoId

func (x *CommentActionRequest) GetVideoId() int64

func (*CommentActionRequest) ProtoMessage

func (*CommentActionRequest) ProtoMessage()

func (*CommentActionRequest) ProtoReflect

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

func (*CommentActionRequest) Reset

func (x *CommentActionRequest) Reset()

func (*CommentActionRequest) Size

func (x *CommentActionRequest) Size() (n int)

func (*CommentActionRequest) String

func (x *CommentActionRequest) String() string

type CommentActionResponse

type CommentActionResponse struct {
	StatusCode int32    `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` //状态码,0成功,其他值失败
	StatusMsg  string   `protobuf:"bytes,2,opt,name=status_msg,json=statusMsg,proto3" json:"status_msg,omitempty"`     //返回状态描述
	Comment    *Comment `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"`                          //评论成功返回评论内容,不需要重新拉取整个评论列表
	// contains filtered or unexported fields
}

func (*CommentActionResponse) Descriptor deprecated

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

Deprecated: Use CommentActionResponse.ProtoReflect.Descriptor instead.

func (*CommentActionResponse) FastRead

func (x *CommentActionResponse) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

func (*CommentActionResponse) FastWrite

func (x *CommentActionResponse) FastWrite(buf []byte) (offset int)

func (*CommentActionResponse) GetComment

func (x *CommentActionResponse) GetComment() *Comment

func (*CommentActionResponse) GetStatusCode

func (x *CommentActionResponse) GetStatusCode() int32

func (*CommentActionResponse) GetStatusMsg

func (x *CommentActionResponse) GetStatusMsg() string

func (*CommentActionResponse) ProtoMessage

func (*CommentActionResponse) ProtoMessage()

func (*CommentActionResponse) ProtoReflect

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

func (*CommentActionResponse) Reset

func (x *CommentActionResponse) Reset()

func (*CommentActionResponse) Size

func (x *CommentActionResponse) Size() (n int)

func (*CommentActionResponse) String

func (x *CommentActionResponse) String() string

type CommentListRequest

type CommentListRequest struct {
	Token   string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	VideoId int64  `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) FastRead

func (x *CommentListRequest) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

func (*CommentListRequest) FastWrite

func (x *CommentListRequest) FastWrite(buf []byte) (offset int)

func (*CommentListRequest) GetToken

func (x *CommentListRequest) GetToken() string

func (*CommentListRequest) GetVideoId

func (x *CommentListRequest) GetVideoId() int64

func (*CommentListRequest) ProtoMessage

func (*CommentListRequest) ProtoMessage()

func (*CommentListRequest) ProtoReflect

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

func (*CommentListRequest) Reset

func (x *CommentListRequest) Reset()

func (*CommentListRequest) Size

func (x *CommentListRequest) Size() (n int)

func (*CommentListRequest) String

func (x *CommentListRequest) String() string

type CommentListResponse

type CommentListResponse struct {
	StatusCode  int32      `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	StatusMsg   string     `protobuf:"bytes,2,opt,name=status_msg,json=statusMsg,proto3" json:"status_msg,omitempty"`
	CommentList []*Comment `protobuf:"bytes,3,rep,name=comment_list,json=commentList,proto3" json:"comment_list,omitempty"`
	// contains filtered or unexported fields
}

func (*CommentListResponse) Descriptor deprecated

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

Deprecated: Use CommentListResponse.ProtoReflect.Descriptor instead.

func (*CommentListResponse) FastRead

func (x *CommentListResponse) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

func (*CommentListResponse) FastWrite

func (x *CommentListResponse) FastWrite(buf []byte) (offset int)

func (*CommentListResponse) GetCommentList

func (x *CommentListResponse) GetCommentList() []*Comment

func (*CommentListResponse) GetStatusCode

func (x *CommentListResponse) GetStatusCode() int32

func (*CommentListResponse) GetStatusMsg

func (x *CommentListResponse) GetStatusMsg() string

func (*CommentListResponse) ProtoMessage

func (*CommentListResponse) ProtoMessage()

func (*CommentListResponse) ProtoReflect

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

func (*CommentListResponse) Reset

func (x *CommentListResponse) Reset()

func (*CommentListResponse) Size

func (x *CommentListResponse) Size() (n int)

func (*CommentListResponse) String

func (x *CommentListResponse) String() string

type CommentService

type CommentService interface {
	CommentAction(ctx context.Context, req *CommentActionRequest) (res *CommentActionResponse, err error)
	CommentList(ctx context.Context, req *CommentListRequest) (res *CommentListResponse, err error)
}

Directories

Path Synopsis
Code generated by Kitex v0.4.4.
Code generated by Kitex v0.4.4.

Jump to

Keyboard shortcuts

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