Documentation
¶
Index ¶
- Variables
- type FeedRequest
- func (p *FeedRequest) GetLatestTime() (v int64)
- func (p *FeedRequest) GetToken() (v string)
- func (p *FeedRequest) GetUserID() (v int64)
- func (p *FeedRequest) Read(iprot thrift.TProtocol) (err error)
- func (p *FeedRequest) ReadField1(iprot thrift.TProtocol) error
- func (p *FeedRequest) ReadField2(iprot thrift.TProtocol) error
- func (p *FeedRequest) ReadField3(iprot thrift.TProtocol) error
- func (p *FeedRequest) String() string
- func (p *FeedRequest) Write(oprot thrift.TProtocol) (err error)
- type FeedResponse
- func (p *FeedResponse) GetNextTime() (v int64)
- func (p *FeedResponse) GetStatusCode() (v int32)
- func (p *FeedResponse) GetStatusMsg() (v string)
- func (p *FeedResponse) GetVideoList() (v []*Video)
- func (p *FeedResponse) IsSetStatusMsg() bool
- func (p *FeedResponse) Read(iprot thrift.TProtocol) (err error)
- func (p *FeedResponse) ReadField1(iprot thrift.TProtocol) error
- func (p *FeedResponse) ReadField2(iprot thrift.TProtocol) error
- func (p *FeedResponse) ReadField3(iprot thrift.TProtocol) error
- func (p *FeedResponse) ReadField4(iprot thrift.TProtocol) error
- func (p *FeedResponse) String() string
- func (p *FeedResponse) Write(oprot thrift.TProtocol) (err error)
- type FeedService
- type FeedServiceClient
- type FeedServiceFeedArgs
- func (p *FeedServiceFeedArgs) GetReq() (v *FeedRequest)
- func (p *FeedServiceFeedArgs) IsSetReq() bool
- func (p *FeedServiceFeedArgs) Read(iprot thrift.TProtocol) (err error)
- func (p *FeedServiceFeedArgs) ReadField1(iprot thrift.TProtocol) error
- func (p *FeedServiceFeedArgs) String() string
- func (p *FeedServiceFeedArgs) Write(oprot thrift.TProtocol) (err error)
- type FeedServiceFeedResult
- func (p *FeedServiceFeedResult) GetSuccess() (v *FeedResponse)
- func (p *FeedServiceFeedResult) IsSetSuccess() bool
- func (p *FeedServiceFeedResult) Read(iprot thrift.TProtocol) (err error)
- func (p *FeedServiceFeedResult) ReadField0(iprot thrift.TProtocol) error
- func (p *FeedServiceFeedResult) String() string
- func (p *FeedServiceFeedResult) Write(oprot thrift.TProtocol) (err error)
- type FeedServiceProcessor
- func (p *FeedServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)
- func (p *FeedServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)
- func (p *FeedServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)
- func (p *FeedServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction
- type User
- func (p *User) GetAvatar() (v string)
- func (p *User) GetBackgroundImage() (v string)
- func (p *User) GetFavoriteCount() (v int64)
- func (p *User) GetFollowCount() (v int64)
- func (p *User) GetFollowerCount() (v int64)
- func (p *User) GetID() (v int64)
- func (p *User) GetIsFollow() (v bool)
- func (p *User) GetName() (v string)
- func (p *User) GetSignature() (v string)
- func (p *User) GetTotalFavorited() (v int64)
- func (p *User) GetWorkCount() (v int64)
- func (p *User) Read(iprot thrift.TProtocol) (err error)
- func (p *User) ReadField1(iprot thrift.TProtocol) error
- func (p *User) ReadField10(iprot thrift.TProtocol) error
- func (p *User) ReadField11(iprot thrift.TProtocol) error
- func (p *User) ReadField2(iprot thrift.TProtocol) error
- func (p *User) ReadField3(iprot thrift.TProtocol) error
- func (p *User) ReadField4(iprot thrift.TProtocol) error
- func (p *User) ReadField5(iprot thrift.TProtocol) error
- func (p *User) ReadField6(iprot thrift.TProtocol) error
- func (p *User) ReadField7(iprot thrift.TProtocol) error
- func (p *User) ReadField8(iprot thrift.TProtocol) error
- func (p *User) ReadField9(iprot thrift.TProtocol) error
- func (p *User) String() string
- func (p *User) Write(oprot thrift.TProtocol) (err error)
- type Video
- func (p *Video) GetAuthor() (v *User)
- func (p *Video) GetCommentCount() (v int64)
- func (p *Video) GetCoverURL() (v string)
- func (p *Video) GetFavoriteCount() (v int64)
- func (p *Video) GetID() (v int64)
- func (p *Video) GetIsFavorite() (v bool)
- func (p *Video) GetPlayURL() (v string)
- func (p *Video) GetTitle() (v string)
- func (p *Video) IsSetAuthor() bool
- func (p *Video) Read(iprot thrift.TProtocol) (err error)
- func (p *Video) ReadField1(iprot thrift.TProtocol) error
- func (p *Video) ReadField2(iprot thrift.TProtocol) error
- func (p *Video) ReadField3(iprot thrift.TProtocol) error
- func (p *Video) ReadField4(iprot thrift.TProtocol) error
- func (p *Video) ReadField5(iprot thrift.TProtocol) error
- func (p *Video) ReadField6(iprot thrift.TProtocol) error
- func (p *Video) ReadField7(iprot thrift.TProtocol) error
- func (p *Video) ReadField8(iprot thrift.TProtocol) error
- func (p *Video) String() string
- func (p *Video) Write(oprot thrift.TProtocol) (err error)
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) 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
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) 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
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 NewFeedServiceClientFactory ¶
func NewFeedServiceClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *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
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
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 (*User) GetBackgroundImage ¶
func (*User) GetFavoriteCount ¶
func (*User) GetFollowCount ¶
func (*User) GetFollowerCount ¶
func (*User) GetIsFollow ¶
func (*User) GetSignature ¶
func (*User) GetTotalFavorited ¶
func (*User) GetWorkCount ¶
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 (*Video) GetCommentCount ¶
func (*Video) GetCoverURL ¶
func (*Video) GetFavoriteCount ¶
func (*Video) GetIsFavorite ¶
func (*Video) GetPlayURL ¶
func (*Video) IsSetAuthor ¶
Click to show internal directories.
Click to hide internal directories.