comment

package
v0.0.0-...-542fe02 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommentActionRequest_CommentID_DEFAULT int64
View Source
var CommentActionRequest_CommentText_DEFAULT string
View Source
var CommentActionResponse_StatusMsg_DEFAULT string
View Source
var CommentListResponse_StatusMsg_DEFAULT string

Functions

This section is empty.

Types

type Comment

type Comment struct {
	// 视频评论id
	ID int64 `thrift:"id,1" form:"id" json:"id" query:"id"`
	// 评论用户信息
	User *User `thrift:"user,2" form:"user" json:"user" query:"user"`
	// 评论内容
	Content string `thrift:"content,3" form:"content" json:"content" query:"content"`
	// 评论发布日期,格式 mm-dd
	CreateDate string `thrift:"create_date,4" form:"create_date" json:"create_date" query:"create_date"`
}
var CommentActionResponse_Comment_DEFAULT *Comment

func NewComment

func NewComment() *Comment

func (*Comment) GetContent

func (p *Comment) GetContent() (v string)

func (*Comment) GetCreateDate

func (p *Comment) GetCreateDate() (v string)

func (*Comment) GetID

func (p *Comment) GetID() (v int64)

func (*Comment) GetUser

func (p *Comment) GetUser() (v *User)

func (*Comment) IsSetUser

func (p *Comment) IsSetUser() bool

func (*Comment) Read

func (p *Comment) Read(iprot thrift.TProtocol) (err error)

func (*Comment) ReadField1

func (p *Comment) ReadField1(iprot thrift.TProtocol) error

func (*Comment) ReadField2

func (p *Comment) ReadField2(iprot thrift.TProtocol) error

func (*Comment) ReadField3

func (p *Comment) ReadField3(iprot thrift.TProtocol) error

func (*Comment) ReadField4

func (p *Comment) ReadField4(iprot thrift.TProtocol) error

func (*Comment) String

func (p *Comment) String() string

func (*Comment) Write

func (p *Comment) Write(oprot thrift.TProtocol) (err error)

type CommentActionRequest

type CommentActionRequest struct {
	// 用户鉴权token
	Token string `thrift:"token,1" form:"token" json:"token" query:"token"`
	// 视频id
	VideoID int64 `thrift:"video_id,2" form:"video_id" json:"video_id" query:"video_id"`
	// 1-发布评论,2-删除评论
	ActionType int32 `thrift:"action_type,3" form:"action_type" json:"action_type" query:"action_type"`
	// 用户填写的评论内容,在action_type=1的时候使用
	CommentText *string `thrift:"comment_text,4,optional" form:"comment_text" json:"comment_text,omitempty" query:"comment_text"`
	// 要删除的评论id,在action_type=2的时候使用
	CommentID *int64 `thrift:"comment_id,5,optional" form:"comment_id" json:"comment_id,omitempty" query:"comment_id"`
}
var CommentServiceCommentActionArgs_Req_DEFAULT *CommentActionRequest

func NewCommentActionRequest

func NewCommentActionRequest() *CommentActionRequest

func (*CommentActionRequest) GetActionType

func (p *CommentActionRequest) GetActionType() (v int32)

func (*CommentActionRequest) GetCommentID

func (p *CommentActionRequest) GetCommentID() (v int64)

func (*CommentActionRequest) GetCommentText

func (p *CommentActionRequest) GetCommentText() (v string)

func (*CommentActionRequest) GetToken

func (p *CommentActionRequest) GetToken() (v string)

func (*CommentActionRequest) GetVideoID

func (p *CommentActionRequest) GetVideoID() (v int64)

func (*CommentActionRequest) IsSetCommentID

func (p *CommentActionRequest) IsSetCommentID() bool

func (*CommentActionRequest) IsSetCommentText

func (p *CommentActionRequest) IsSetCommentText() bool

func (*CommentActionRequest) Read

func (p *CommentActionRequest) Read(iprot thrift.TProtocol) (err error)

func (*CommentActionRequest) ReadField1

func (p *CommentActionRequest) ReadField1(iprot thrift.TProtocol) error

func (*CommentActionRequest) ReadField2

func (p *CommentActionRequest) ReadField2(iprot thrift.TProtocol) error

func (*CommentActionRequest) ReadField3

func (p *CommentActionRequest) ReadField3(iprot thrift.TProtocol) error

func (*CommentActionRequest) ReadField4

func (p *CommentActionRequest) ReadField4(iprot thrift.TProtocol) error

func (*CommentActionRequest) ReadField5

func (p *CommentActionRequest) ReadField5(iprot thrift.TProtocol) error

func (*CommentActionRequest) String

func (p *CommentActionRequest) String() string

func (*CommentActionRequest) Write

func (p *CommentActionRequest) Write(oprot thrift.TProtocol) (err error)

type CommentActionResponse

type CommentActionResponse struct {
	// 状态码,0-成功,其他值-失败
	StatusCode int32 `thrift:"status_code,1" form:"status_code" json:"status_code" query:"status_code"`
	// 返回状态描述
	StatusMsg *string `thrift:"status_msg,2,optional" form:"status_msg" json:"status_msg,omitempty" query:"status_msg"`
	// 评论成功返回评论内容,不需要重新拉取整个列表
	Comment *Comment `thrift:"comment,3,optional" form:"comment" json:"comment,omitempty" query:"comment"`
}
var CommentServiceCommentActionResult_Success_DEFAULT *CommentActionResponse

func NewCommentActionResponse

func NewCommentActionResponse() *CommentActionResponse

func (*CommentActionResponse) GetComment

func (p *CommentActionResponse) GetComment() (v *Comment)

func (*CommentActionResponse) GetStatusCode

func (p *CommentActionResponse) GetStatusCode() (v int32)

func (*CommentActionResponse) GetStatusMsg

func (p *CommentActionResponse) GetStatusMsg() (v string)

func (*CommentActionResponse) IsSetComment

func (p *CommentActionResponse) IsSetComment() bool

func (*CommentActionResponse) IsSetStatusMsg

func (p *CommentActionResponse) IsSetStatusMsg() bool

func (*CommentActionResponse) Read

func (p *CommentActionResponse) Read(iprot thrift.TProtocol) (err error)

func (*CommentActionResponse) ReadField1

func (p *CommentActionResponse) ReadField1(iprot thrift.TProtocol) error

func (*CommentActionResponse) ReadField2

func (p *CommentActionResponse) ReadField2(iprot thrift.TProtocol) error

func (*CommentActionResponse) ReadField3

func (p *CommentActionResponse) ReadField3(iprot thrift.TProtocol) error

func (*CommentActionResponse) String

func (p *CommentActionResponse) String() string

func (*CommentActionResponse) Write

func (p *CommentActionResponse) Write(oprot thrift.TProtocol) (err error)

type CommentListRequest

type CommentListRequest struct {
	// 用户鉴权token
	Token string `thrift:"token,1" form:"token" json:"token" query:"token"`
	// 视频id
	VideoID int64 `thrift:"video_id,2" form:"video_id" json:"video_id" query:"video_id"`
}
var CommentServiceCommentListArgs_Req_DEFAULT *CommentListRequest

func NewCommentListRequest

func NewCommentListRequest() *CommentListRequest

func (*CommentListRequest) GetToken

func (p *CommentListRequest) GetToken() (v string)

func (*CommentListRequest) GetVideoID

func (p *CommentListRequest) GetVideoID() (v int64)

func (*CommentListRequest) Read

func (p *CommentListRequest) Read(iprot thrift.TProtocol) (err error)

func (*CommentListRequest) ReadField1

func (p *CommentListRequest) ReadField1(iprot thrift.TProtocol) error

func (*CommentListRequest) ReadField2

func (p *CommentListRequest) ReadField2(iprot thrift.TProtocol) error

func (*CommentListRequest) String

func (p *CommentListRequest) String() string

func (*CommentListRequest) Write

func (p *CommentListRequest) Write(oprot thrift.TProtocol) (err error)

type CommentListResponse

type CommentListResponse struct {
	// 状态码,0-成功,其他值-失败
	StatusCode int32 `thrift:"status_code,1" form:"status_code" json:"status_code" query:"status_code"`
	// 返回状态描述
	StatusMsg *string `thrift:"status_msg,2,optional" form:"status_msg" json:"status_msg,omitempty" query:"status_msg"`
	// 评论列表
	CommentList []*Comment `thrift:"comment_list,3" form:"comment_list" json:"comment_list" query:"comment_list"`
}
var CommentServiceCommentListResult_Success_DEFAULT *CommentListResponse

func NewCommentListResponse

func NewCommentListResponse() *CommentListResponse

func (*CommentListResponse) GetCommentList

func (p *CommentListResponse) GetCommentList() (v []*Comment)

func (*CommentListResponse) GetStatusCode

func (p *CommentListResponse) GetStatusCode() (v int32)

func (*CommentListResponse) GetStatusMsg

func (p *CommentListResponse) GetStatusMsg() (v string)

func (*CommentListResponse) IsSetStatusMsg

func (p *CommentListResponse) IsSetStatusMsg() bool

func (*CommentListResponse) Read

func (p *CommentListResponse) Read(iprot thrift.TProtocol) (err error)

func (*CommentListResponse) ReadField1

func (p *CommentListResponse) ReadField1(iprot thrift.TProtocol) error

func (*CommentListResponse) ReadField2

func (p *CommentListResponse) ReadField2(iprot thrift.TProtocol) error

func (*CommentListResponse) ReadField3

func (p *CommentListResponse) ReadField3(iprot thrift.TProtocol) error

func (*CommentListResponse) String

func (p *CommentListResponse) String() string

func (*CommentListResponse) Write

func (p *CommentListResponse) Write(oprot thrift.TProtocol) (err error)

type CommentService

type CommentService interface {
	// 评论操作
	CommentAction(ctx context.Context, req *CommentActionRequest) (r *CommentActionResponse, err error)
	// 获取评论列表
	CommentList(ctx context.Context, req *CommentListRequest) (r *CommentListResponse, err error)
}

type CommentServiceClient

type CommentServiceClient struct {
	// contains filtered or unexported fields
}

func NewCommentServiceClient

func NewCommentServiceClient(c thrift.TClient) *CommentServiceClient

func NewCommentServiceClientProtocol

func NewCommentServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *CommentServiceClient

func (*CommentServiceClient) Client_

func (p *CommentServiceClient) Client_() thrift.TClient

func (*CommentServiceClient) CommentAction

func (*CommentServiceClient) CommentList

type CommentServiceCommentActionArgs

type CommentServiceCommentActionArgs struct {
	Req *CommentActionRequest `thrift:"req,1"`
}

func NewCommentServiceCommentActionArgs

func NewCommentServiceCommentActionArgs() *CommentServiceCommentActionArgs

func (*CommentServiceCommentActionArgs) GetReq

func (*CommentServiceCommentActionArgs) IsSetReq

func (p *CommentServiceCommentActionArgs) IsSetReq() bool

func (*CommentServiceCommentActionArgs) Read

func (*CommentServiceCommentActionArgs) ReadField1

func (*CommentServiceCommentActionArgs) String

func (*CommentServiceCommentActionArgs) Write

func (p *CommentServiceCommentActionArgs) Write(oprot thrift.TProtocol) (err error)

type CommentServiceCommentActionResult

type CommentServiceCommentActionResult struct {
	Success *CommentActionResponse `thrift:"success,0,optional"`
}

func NewCommentServiceCommentActionResult

func NewCommentServiceCommentActionResult() *CommentServiceCommentActionResult

func (*CommentServiceCommentActionResult) GetSuccess

func (*CommentServiceCommentActionResult) IsSetSuccess

func (p *CommentServiceCommentActionResult) IsSetSuccess() bool

func (*CommentServiceCommentActionResult) Read

func (*CommentServiceCommentActionResult) ReadField0

func (*CommentServiceCommentActionResult) String

func (*CommentServiceCommentActionResult) Write

type CommentServiceCommentListArgs

type CommentServiceCommentListArgs struct {
	Req *CommentListRequest `thrift:"req,1"`
}

func NewCommentServiceCommentListArgs

func NewCommentServiceCommentListArgs() *CommentServiceCommentListArgs

func (*CommentServiceCommentListArgs) GetReq

func (*CommentServiceCommentListArgs) IsSetReq

func (p *CommentServiceCommentListArgs) IsSetReq() bool

func (*CommentServiceCommentListArgs) Read

func (p *CommentServiceCommentListArgs) Read(iprot thrift.TProtocol) (err error)

func (*CommentServiceCommentListArgs) ReadField1

func (p *CommentServiceCommentListArgs) ReadField1(iprot thrift.TProtocol) error

func (*CommentServiceCommentListArgs) String

func (*CommentServiceCommentListArgs) Write

func (p *CommentServiceCommentListArgs) Write(oprot thrift.TProtocol) (err error)

type CommentServiceCommentListResult

type CommentServiceCommentListResult struct {
	Success *CommentListResponse `thrift:"success,0,optional"`
}

func NewCommentServiceCommentListResult

func NewCommentServiceCommentListResult() *CommentServiceCommentListResult

func (*CommentServiceCommentListResult) GetSuccess

func (*CommentServiceCommentListResult) IsSetSuccess

func (p *CommentServiceCommentListResult) IsSetSuccess() bool

func (*CommentServiceCommentListResult) Read

func (*CommentServiceCommentListResult) ReadField0

func (*CommentServiceCommentListResult) String

func (*CommentServiceCommentListResult) Write

func (p *CommentServiceCommentListResult) Write(oprot thrift.TProtocol) (err error)

type CommentServiceProcessor

type CommentServiceProcessor struct {
	// contains filtered or unexported fields
}

func NewCommentServiceProcessor

func NewCommentServiceProcessor(handler CommentService) *CommentServiceProcessor

func (*CommentServiceProcessor) AddToProcessorMap

func (p *CommentServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)

func (*CommentServiceProcessor) GetProcessorFunction

func (p *CommentServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)

func (*CommentServiceProcessor) Process

func (p *CommentServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)

func (*CommentServiceProcessor) ProcessorMap

type User

type User struct {
	// 用户id
	ID int64 `thrift:"id,1" form:"id" json:"id" query:"id"`
	// 用户名称
	Name string `thrift:"name,2" form:"name" json:"name" query:"name"`
	// 关注总数
	FollowCount int64 `thrift:"follow_count,3" form:"follow_count" json:"follow_count" query:"follow_count"`
	// 粉丝总数
	FollowerCount int64 `thrift:"follower_count,4" form:"follower_count" json:"follower_count" query:"follower_count"`
	// true-已关注,false-未关注
	IsFollow bool `thrift:"is_follow,5" form:"is_follow" json:"is_follow" query:"is_follow"`
	// 用户头像
	Avatar string `thrift:"avatar,6" form:"avatar" json:"avatar" query:"avatar"`
	// 用户个人页顶部大图
	BackgroundImage string `thrift:"background_image,7" form:"background_image" json:"background_image" query:"background_image"`
	// 个人简介
	Signature string `thrift:"signature,8" form:"signature" json:"signature" query:"signature"`
	// 获赞数量
	TotalFavorited int64 `thrift:"total_favorited,9" form:"total_favorited" json:"total_favorited" query:"total_favorited"`
	// 作品数量
	WorkCount int64 `thrift:"work_count,10" form:"work_count" json:"work_count" query:"work_count"`
	// 点赞数量
	FavoriteCount int64 `thrift:"favorite_count,11" form:"favorite_count" json:"favorite_count" query:"favorite_count"`
}
var Comment_User_DEFAULT *User

func NewUser

func NewUser() *User

func (*User) GetAvatar

func (p *User) GetAvatar() (v string)

func (*User) GetBackgroundImage

func (p *User) GetBackgroundImage() (v string)

func (*User) GetFavoriteCount

func (p *User) GetFavoriteCount() (v int64)

func (*User) GetFollowCount

func (p *User) GetFollowCount() (v int64)

func (*User) GetFollowerCount

func (p *User) GetFollowerCount() (v int64)

func (*User) GetID

func (p *User) GetID() (v int64)

func (*User) GetIsFollow

func (p *User) GetIsFollow() (v bool)

func (*User) GetName

func (p *User) GetName() (v string)

func (*User) GetSignature

func (p *User) GetSignature() (v string)

func (*User) GetTotalFavorited

func (p *User) GetTotalFavorited() (v int64)

func (*User) GetWorkCount

func (p *User) GetWorkCount() (v int64)

func (*User) Read

func (p *User) Read(iprot thrift.TProtocol) (err error)

func (*User) ReadField1

func (p *User) ReadField1(iprot thrift.TProtocol) error

func (*User) ReadField10

func (p *User) ReadField10(iprot thrift.TProtocol) error

func (*User) ReadField11

func (p *User) ReadField11(iprot thrift.TProtocol) error

func (*User) ReadField2

func (p *User) ReadField2(iprot thrift.TProtocol) error

func (*User) ReadField3

func (p *User) ReadField3(iprot thrift.TProtocol) error

func (*User) ReadField4

func (p *User) ReadField4(iprot thrift.TProtocol) error

func (*User) ReadField5

func (p *User) ReadField5(iprot thrift.TProtocol) error

func (*User) ReadField6

func (p *User) ReadField6(iprot thrift.TProtocol) error

func (*User) ReadField7

func (p *User) ReadField7(iprot thrift.TProtocol) error

func (*User) ReadField8

func (p *User) ReadField8(iprot thrift.TProtocol) error

func (*User) ReadField9

func (p *User) ReadField9(iprot thrift.TProtocol) error

func (*User) String

func (p *User) String() string

func (*User) Write

func (p *User) Write(oprot thrift.TProtocol) (err error)

Jump to

Keyboard shortcuts

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