Documentation ¶
Index ¶
- Variables
- type DouyinFeedRequest
- func (*DouyinFeedRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DouyinFeedRequest) GetLatestTime() int64
- func (x *DouyinFeedRequest) GetToken() string
- func (*DouyinFeedRequest) ProtoMessage()
- func (x *DouyinFeedRequest) ProtoReflect() protoreflect.Message
- func (x *DouyinFeedRequest) Reset()
- func (x *DouyinFeedRequest) String() string
- type DouyinFeedResponse
- func (*DouyinFeedResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DouyinFeedResponse) GetNextTime() int64
- func (x *DouyinFeedResponse) GetStatusCode() int32
- func (x *DouyinFeedResponse) GetStatusMsg() string
- func (x *DouyinFeedResponse) GetVideoList() []*Video
- func (*DouyinFeedResponse) ProtoMessage()
- func (x *DouyinFeedResponse) ProtoReflect() protoreflect.Message
- func (x *DouyinFeedResponse) Reset()
- func (x *DouyinFeedResponse) String() string
- type FeedSrv
- type Video
- func (*Video) Descriptor() ([]byte, []int)deprecated
- func (x *Video) GetAuthor() *user.User
- func (x *Video) GetCommentCount() int64
- func (x *Video) GetCoverUrl() string
- func (x *Video) GetFavoriteCount() int64
- func (x *Video) GetId() int64
- func (x *Video) GetIsFavorite() bool
- func (x *Video) GetPlayUrl() string
- func (x *Video) GetTitle() string
- func (*Video) ProtoMessage()
- func (x *Video) ProtoReflect() protoreflect.Message
- func (x *Video) Reset()
- func (x *Video) String() string
- type VideoIdRequest
- func (*VideoIdRequest) Descriptor() ([]byte, []int)deprecated
- func (x *VideoIdRequest) GetSearchId() int64
- func (x *VideoIdRequest) GetVideoId() int64
- func (*VideoIdRequest) ProtoMessage()
- func (x *VideoIdRequest) ProtoReflect() protoreflect.Message
- func (x *VideoIdRequest) Reset()
- func (x *VideoIdRequest) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_feed_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type DouyinFeedRequest ¶
type DouyinFeedRequest struct { LatestTime *int64 `protobuf:"varint,1,opt,name=latest_time,json=latestTime,proto3,oneof" json:"latest_time,omitempty"` // 可选参数,限制返回视频的最新投稿时间戳,精确到秒,不填表示当前时间 Token *string `protobuf:"bytes,2,opt,name=token,proto3,oneof" json:"token,omitempty"` // 可选参数,登录用户设置 // contains filtered or unexported fields }
func (*DouyinFeedRequest) Descriptor
deprecated
func (*DouyinFeedRequest) Descriptor() ([]byte, []int)
Deprecated: Use DouyinFeedRequest.ProtoReflect.Descriptor instead.
func (*DouyinFeedRequest) GetLatestTime ¶
func (x *DouyinFeedRequest) GetLatestTime() int64
func (*DouyinFeedRequest) GetToken ¶
func (x *DouyinFeedRequest) GetToken() string
func (*DouyinFeedRequest) ProtoMessage ¶
func (*DouyinFeedRequest) ProtoMessage()
func (*DouyinFeedRequest) ProtoReflect ¶
func (x *DouyinFeedRequest) ProtoReflect() protoreflect.Message
func (*DouyinFeedRequest) Reset ¶
func (x *DouyinFeedRequest) Reset()
func (*DouyinFeedRequest) String ¶
func (x *DouyinFeedRequest) String() string
type DouyinFeedResponse ¶
type DouyinFeedResponse 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,oneof" json:"status_msg,omitempty"` // 返回状态描述 VideoList []*Video `protobuf:"bytes,3,rep,name=video_list,json=videoList,proto3" json:"video_list,omitempty"` // 视频列表 NextTime *int64 `protobuf:"varint,4,opt,name=next_time,json=nextTime,proto3,oneof" json:"next_time,omitempty"` // 本次返回的视频中,发布最早的时间,作为下次请求时的latest_time // contains filtered or unexported fields }
func (*DouyinFeedResponse) Descriptor
deprecated
func (*DouyinFeedResponse) Descriptor() ([]byte, []int)
Deprecated: Use DouyinFeedResponse.ProtoReflect.Descriptor instead.
func (*DouyinFeedResponse) GetNextTime ¶
func (x *DouyinFeedResponse) GetNextTime() int64
func (*DouyinFeedResponse) GetStatusCode ¶
func (x *DouyinFeedResponse) GetStatusCode() int32
func (*DouyinFeedResponse) GetStatusMsg ¶
func (x *DouyinFeedResponse) GetStatusMsg() string
func (*DouyinFeedResponse) GetVideoList ¶
func (x *DouyinFeedResponse) GetVideoList() []*Video
func (*DouyinFeedResponse) ProtoMessage ¶
func (*DouyinFeedResponse) ProtoMessage()
func (*DouyinFeedResponse) ProtoReflect ¶
func (x *DouyinFeedResponse) ProtoReflect() protoreflect.Message
func (*DouyinFeedResponse) Reset ¶
func (x *DouyinFeedResponse) Reset()
func (*DouyinFeedResponse) String ¶
func (x *DouyinFeedResponse) String() string
type FeedSrv ¶
type FeedSrv interface { GetUserFeed(ctx context.Context, req *DouyinFeedRequest) (res *DouyinFeedResponse, err error) GetVideoById(ctx context.Context, req *VideoIdRequest) (res *Video, err error) }
type Video ¶
type Video struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 视频唯一标识 Author *user.User `protobuf:"bytes,2,opt,name=author,proto3" json:"author,omitempty"` // 视频作者信息 PlayUrl string `protobuf:"bytes,3,opt,name=play_url,json=playUrl,proto3" json:"play_url,omitempty"` // 视频播放地址 CoverUrl string `protobuf:"bytes,4,opt,name=cover_url,json=coverUrl,proto3" json:"cover_url,omitempty"` // 视频封面地址 FavoriteCount int64 `protobuf:"varint,5,opt,name=favorite_count,json=favoriteCount,proto3" json:"favorite_count,omitempty"` // 视频的点赞总数 CommentCount int64 `protobuf:"varint,6,opt,name=comment_count,json=commentCount,proto3" json:"comment_count,omitempty"` // 视频的评论总数 IsFavorite bool `protobuf:"varint,7,opt,name=is_favorite,json=isFavorite,proto3" json:"is_favorite,omitempty"` // true-已点赞,false-未点赞 Title string `protobuf:"bytes,8,opt,name=title,proto3" json:"title,omitempty"` // 视频标题 // contains filtered or unexported fields }
func (*Video) Descriptor
deprecated
func (*Video) GetCommentCount ¶
func (*Video) GetCoverUrl ¶
func (*Video) GetFavoriteCount ¶
func (*Video) GetIsFavorite ¶
func (*Video) GetPlayUrl ¶
func (*Video) ProtoMessage ¶
func (*Video) ProtoMessage()
func (*Video) ProtoReflect ¶
func (x *Video) ProtoReflect() protoreflect.Message
type VideoIdRequest ¶
type VideoIdRequest struct { VideoId int64 `protobuf:"varint,1,opt,name=video_id,json=videoId,proto3" json:"video_id,omitempty"` SearchId int64 `protobuf:"varint,2,opt,name=search_id,json=searchId,proto3" json:"search_id,omitempty"` // contains filtered or unexported fields }
func (*VideoIdRequest) Descriptor
deprecated
func (*VideoIdRequest) Descriptor() ([]byte, []int)
Deprecated: Use VideoIdRequest.ProtoReflect.Descriptor instead.
func (*VideoIdRequest) GetSearchId ¶
func (x *VideoIdRequest) GetSearchId() int64
func (*VideoIdRequest) GetVideoId ¶
func (x *VideoIdRequest) GetVideoId() int64
func (*VideoIdRequest) ProtoMessage ¶
func (*VideoIdRequest) ProtoMessage()
func (*VideoIdRequest) ProtoReflect ¶
func (x *VideoIdRequest) ProtoReflect() protoreflect.Message
func (*VideoIdRequest) Reset ¶
func (x *VideoIdRequest) Reset()
func (*VideoIdRequest) String ¶
func (x *VideoIdRequest) String() string
Click to show internal directories.
Click to hide internal directories.