Documentation ¶
Index ¶
- Variables
- type BaseResp
- func (*BaseResp) Descriptor() ([]byte, []int)deprecated
- func (x *BaseResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *BaseResp) FastWrite(buf []byte) (offset int)
- func (x *BaseResp) GetServiceTime() int64
- func (x *BaseResp) GetStatusCode() int32
- func (x *BaseResp) GetStatusMessage() string
- func (*BaseResp) ProtoMessage()
- func (x *BaseResp) ProtoReflect() protoreflect.Message
- func (x *BaseResp) Reset()
- func (x *BaseResp) Size() (n int)
- func (x *BaseResp) String() string
- type FeedRequest
- func (*FeedRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FeedRequest) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *FeedRequest) FastWrite(buf []byte) (offset int)
- func (x *FeedRequest) GetLatestTime() int64
- func (x *FeedRequest) GetToken() string
- func (*FeedRequest) ProtoMessage()
- func (x *FeedRequest) ProtoReflect() protoreflect.Message
- func (x *FeedRequest) Reset()
- func (x *FeedRequest) Size() (n int)
- func (x *FeedRequest) String() string
- type FeedResponse
- func (*FeedResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FeedResponse) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *FeedResponse) FastWrite(buf []byte) (offset int)
- func (x *FeedResponse) GetBaseResp() *BaseResp
- func (x *FeedResponse) GetNextTime() int64
- func (x *FeedResponse) GetVideoList() []*Video
- func (*FeedResponse) ProtoMessage()
- func (x *FeedResponse) ProtoReflect() protoreflect.Message
- func (x *FeedResponse) Reset()
- func (x *FeedResponse) Size() (n int)
- func (x *FeedResponse) String() string
- type FeedService
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *User) FastWrite(buf []byte) (offset int)
- func (x *User) GetAvatar() string
- func (x *User) GetBackgroundImage() string
- func (x *User) GetFavoriteCount() int64
- func (x *User) GetFollowCount() int64
- func (x *User) GetFollowerCount() int64
- func (x *User) GetId() int64
- func (x *User) GetIsFollow() bool
- func (x *User) GetName() string
- func (x *User) GetSignature() string
- func (x *User) GetTotalFavorited() int64
- func (x *User) GetWorkCount() int64
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) Size() (n int)
- func (x *User) String() string
- type Video
- func (*Video) Descriptor() ([]byte, []int)deprecated
- func (x *Video) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *Video) FastWrite(buf []byte) (offset int)
- func (x *Video) GetAuthor() *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) Size() (n int)
- func (x *Video) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_idl_feed_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type BaseResp ¶
type BaseResp struct { StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` //状态码 StatusMessage string `protobuf:"bytes,2,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"` //状态描述 ServiceTime int64 `protobuf:"varint,3,opt,name=service_time,json=serviceTime,proto3" json:"service_time,omitempty"` //服务时间 // contains filtered or unexported fields }
func (*BaseResp) Descriptor
deprecated
func (*BaseResp) GetServiceTime ¶
func (*BaseResp) GetStatusCode ¶
func (*BaseResp) GetStatusMessage ¶
func (*BaseResp) ProtoMessage ¶
func (*BaseResp) ProtoMessage()
func (*BaseResp) ProtoReflect ¶
func (x *BaseResp) ProtoReflect() protoreflect.Message
type FeedRequest ¶
type FeedRequest struct { LatestTime int64 `protobuf:"varint,1,opt,name=latest_time,json=latestTime,proto3" json:"latest_time,omitempty"` // 可选参数,限制返回视频的最新投稿时间戳,精确到秒,不填表示当前时间 Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` // 可选参数,登陆用户设置 // contains filtered or unexported fields }
func (*FeedRequest) Descriptor
deprecated
func (*FeedRequest) Descriptor() ([]byte, []int)
Deprecated: Use FeedRequest.ProtoReflect.Descriptor instead.
func (*FeedRequest) FastWrite ¶
func (x *FeedRequest) FastWrite(buf []byte) (offset int)
func (*FeedRequest) GetLatestTime ¶
func (x *FeedRequest) GetLatestTime() int64
func (*FeedRequest) GetToken ¶
func (x *FeedRequest) GetToken() string
func (*FeedRequest) ProtoMessage ¶
func (*FeedRequest) ProtoMessage()
func (*FeedRequest) ProtoReflect ¶
func (x *FeedRequest) ProtoReflect() protoreflect.Message
func (*FeedRequest) Reset ¶
func (x *FeedRequest) Reset()
func (*FeedRequest) Size ¶
func (x *FeedRequest) Size() (n int)
func (*FeedRequest) String ¶
func (x *FeedRequest) String() string
type FeedResponse ¶
type FeedResponse struct { BaseResp *BaseResp `protobuf:"bytes,1,opt,name=base_resp,json=baseResp,proto3" json:"base_resp,omitempty"` VideoList []*Video `protobuf:"bytes,2,rep,name=video_list,json=videoList,proto3" json:"video_list,omitempty"` // 视频列表 NextTime int64 `protobuf:"varint,3,opt,name=next_time,json=nextTime,proto3" json:"next_time,omitempty"` // 本次返回的视频中,发布最早的时间,作为下次请求时的latest_time // contains filtered or unexported fields }
func (*FeedResponse) Descriptor
deprecated
func (*FeedResponse) Descriptor() ([]byte, []int)
Deprecated: Use FeedResponse.ProtoReflect.Descriptor instead.
func (*FeedResponse) FastWrite ¶
func (x *FeedResponse) FastWrite(buf []byte) (offset int)
func (*FeedResponse) GetBaseResp ¶
func (x *FeedResponse) GetBaseResp() *BaseResp
func (*FeedResponse) GetNextTime ¶
func (x *FeedResponse) GetNextTime() int64
func (*FeedResponse) GetVideoList ¶
func (x *FeedResponse) GetVideoList() []*Video
func (*FeedResponse) ProtoMessage ¶
func (*FeedResponse) ProtoMessage()
func (*FeedResponse) ProtoReflect ¶
func (x *FeedResponse) ProtoReflect() protoreflect.Message
func (*FeedResponse) Reset ¶
func (x *FeedResponse) Reset()
func (*FeedResponse) Size ¶
func (x *FeedResponse) Size() (n int)
func (*FeedResponse) String ¶
func (x *FeedResponse) String() string
type FeedService ¶
type FeedService interface {
Feed(ctx context.Context, req *FeedRequest) (res *FeedResponse, err error)
}
type User ¶
type User struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` //用户id Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` //用户名称 FollowCount int64 `protobuf:"varint,3,opt,name=follow_count,json=followCount,proto3" json:"follow_count,omitempty"` //关注总数 FollowerCount int64 `protobuf:"varint,4,opt,name=follower_count,json=followerCount,proto3" json:"follower_count,omitempty"` //粉丝总数 IsFollow bool `protobuf:"varint,5,opt,name=is_follow,json=isFollow,proto3" json:"is_follow,omitempty"` //true-已关注,false-未关注 Avatar string `protobuf:"bytes,6,opt,name=avatar,proto3" json:"avatar,omitempty"` //用户头像 BackgroundImage string `protobuf:"bytes,7,opt,name=background_image,json=backgroundImage,proto3" json:"background_image,omitempty"` //背景图 Signature string `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"` TotalFavorited int64 `protobuf:"varint,9,opt,name=total_favorited,json=totalFavorited,proto3" json:"total_favorited,omitempty"` WorkCount int64 `protobuf:"varint,10,opt,name=work_count,json=workCount,proto3" json:"work_count,omitempty"` FavoriteCount int64 `protobuf:"varint,11,opt,name=favorite_count,json=favoriteCount,proto3" json:"favorite_count,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetBackgroundImage ¶
func (*User) GetFavoriteCount ¶
func (*User) GetFollowCount ¶
func (*User) GetFollowerCount ¶
func (*User) GetIsFollow ¶
func (*User) GetSignature ¶
func (*User) GetTotalFavorited ¶
func (*User) GetWorkCount ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type Video ¶
type Video struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` //视频唯一标识 Author *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
Click to show internal directories.
Click to hide internal directories.