feed

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 FeedResponse_StatusMsg_DEFAULT string

Functions

This section is empty.

Types

type FeedRequest

type FeedRequest struct {
	// 可选参数,限制返回视频的最新投稿时间戳,精确到秒,不填表示当前时间
	LatestTime int64 `thrift:"latest_time,1" json:"latest_time" query:"latest_time"`
	// 可选参数,登录用户设置
	Token string `thrift:"token,2" json:"token" query:"token"`
	// 用户id
	UserID int64 `thrift:"user_id,3" form:"user_id" json:"user_id" query:"user_id"`
}
var FeedServiceFeedArgs_Req_DEFAULT *FeedRequest

func NewFeedRequest

func NewFeedRequest() *FeedRequest

func (*FeedRequest) GetLatestTime

func (p *FeedRequest) GetLatestTime() (v int64)

func (*FeedRequest) GetToken

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

func (*FeedRequest) GetUserID

func (p *FeedRequest) GetUserID() (v int64)

func (*FeedRequest) Read

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

func (*FeedRequest) ReadField1

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

func (*FeedRequest) ReadField2

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

func (*FeedRequest) ReadField3

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

func (*FeedRequest) String

func (p *FeedRequest) String() string

func (*FeedRequest) Write

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

type FeedResponse

type FeedResponse 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"`
	// 视频列表
	VideoList []*Video `thrift:"video_list,3" form:"video_list" json:"video_list" query:"video_list"`
	// 本次返回的视频中,发布最早的时间,作为下次请求时的latest_time
	NextTime int64 `thrift:"next_time,4" form:"next_time" json:"next_time" query:"next_time"`
}
var FeedServiceFeedResult_Success_DEFAULT *FeedResponse

func NewFeedResponse

func NewFeedResponse() *FeedResponse

func (*FeedResponse) GetNextTime

func (p *FeedResponse) GetNextTime() (v int64)

func (*FeedResponse) GetStatusCode

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

func (*FeedResponse) GetStatusMsg

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

func (*FeedResponse) GetVideoList

func (p *FeedResponse) GetVideoList() (v []*Video)

func (*FeedResponse) IsSetStatusMsg

func (p *FeedResponse) IsSetStatusMsg() bool

func (*FeedResponse) Read

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

func (*FeedResponse) ReadField1

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

func (*FeedResponse) ReadField2

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

func (*FeedResponse) ReadField3

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

func (*FeedResponse) ReadField4

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

func (*FeedResponse) String

func (p *FeedResponse) String() string

func (*FeedResponse) Write

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

type FeedService

type FeedService interface {
	// 获取视频流
	Feed(ctx context.Context, req *FeedRequest) (r *FeedResponse, err error)
}

type FeedServiceClient

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

func NewFeedServiceClient

func NewFeedServiceClient(c thrift.TClient) *FeedServiceClient

func NewFeedServiceClientProtocol

func NewFeedServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *FeedServiceClient

func (*FeedServiceClient) Client_

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

func (*FeedServiceClient) Feed

func (p *FeedServiceClient) Feed(ctx context.Context, req *FeedRequest) (r *FeedResponse, err error)

type FeedServiceFeedArgs

type FeedServiceFeedArgs struct {
	Req *FeedRequest `thrift:"req,1,required"`
}

func NewFeedServiceFeedArgs

func NewFeedServiceFeedArgs() *FeedServiceFeedArgs

func (*FeedServiceFeedArgs) GetReq

func (p *FeedServiceFeedArgs) GetReq() (v *FeedRequest)

func (*FeedServiceFeedArgs) IsSetReq

func (p *FeedServiceFeedArgs) IsSetReq() bool

func (*FeedServiceFeedArgs) Read

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

func (*FeedServiceFeedArgs) ReadField1

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

func (*FeedServiceFeedArgs) String

func (p *FeedServiceFeedArgs) String() string

func (*FeedServiceFeedArgs) Write

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

type FeedServiceFeedResult

type FeedServiceFeedResult struct {
	Success *FeedResponse `thrift:"success,0,optional"`
}

func NewFeedServiceFeedResult

func NewFeedServiceFeedResult() *FeedServiceFeedResult

func (*FeedServiceFeedResult) GetSuccess

func (p *FeedServiceFeedResult) GetSuccess() (v *FeedResponse)

func (*FeedServiceFeedResult) IsSetSuccess

func (p *FeedServiceFeedResult) IsSetSuccess() bool

func (*FeedServiceFeedResult) Read

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

func (*FeedServiceFeedResult) ReadField0

func (p *FeedServiceFeedResult) ReadField0(iprot thrift.TProtocol) error

func (*FeedServiceFeedResult) String

func (p *FeedServiceFeedResult) String() string

func (*FeedServiceFeedResult) Write

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

type FeedServiceProcessor

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

func NewFeedServiceProcessor

func NewFeedServiceProcessor(handler FeedService) *FeedServiceProcessor

func (*FeedServiceProcessor) AddToProcessorMap

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

func (*FeedServiceProcessor) GetProcessorFunction

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

func (*FeedServiceProcessor) Process

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

func (*FeedServiceProcessor) ProcessorMap

func (p *FeedServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction

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 Video_Author_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)

type Video

type Video struct {
	// 视频唯一标识
	ID int64 `thrift:"id,1" form:"id" json:"id" query:"id"`
	// 视频作者信息
	Author *User `thrift:"author,2" form:"author" json:"author" query:"author"`
	// 视频播放地址
	PlayURL string `thrift:"play_url,3" form:"play_url" json:"play_url" query:"play_url"`
	// 视频封面地址
	CoverURL string `thrift:"cover_url,4" form:"cover_url" json:"cover_url" query:"cover_url"`
	// 视频的点赞总数
	FavoriteCount int64 `thrift:"favorite_count,5" form:"favorite_count" json:"favorite_count" query:"favorite_count"`
	// 视频的评论总数
	CommentCount int64 `thrift:"comment_count,6" form:"comment_count" json:"comment_count" query:"comment_count"`
	// true-已点赞,false-未点赞
	IsFavorite bool `thrift:"is_favorite,7" form:"is_favorite" json:"is_favorite" query:"is_favorite"`
	// 视频标题
	Title string `thrift:"title,8" form:"title" json:"title" query:"title"`
}

func NewVideo

func NewVideo() *Video

func (*Video) GetAuthor

func (p *Video) GetAuthor() (v *User)

func (*Video) GetCommentCount

func (p *Video) GetCommentCount() (v int64)

func (*Video) GetCoverURL

func (p *Video) GetCoverURL() (v string)

func (*Video) GetFavoriteCount

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

func (*Video) GetID

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

func (*Video) GetIsFavorite

func (p *Video) GetIsFavorite() (v bool)

func (*Video) GetPlayURL

func (p *Video) GetPlayURL() (v string)

func (*Video) GetTitle

func (p *Video) GetTitle() (v string)

func (*Video) IsSetAuthor

func (p *Video) IsSetAuthor() bool

func (*Video) Read

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

func (*Video) ReadField1

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

func (*Video) ReadField2

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

func (*Video) ReadField3

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

func (*Video) ReadField4

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

func (*Video) ReadField5

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

func (*Video) ReadField6

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

func (*Video) ReadField7

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

func (*Video) ReadField8

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

func (*Video) String

func (p *Video) String() string

func (*Video) Write

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

Jump to

Keyboard shortcuts

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