feed

package
v0.0.0-...-e4e76df Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

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"`                              // 可选参数,登录用户设置
	Id         int64  `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"`
	HasLogin   bool   `protobuf:"varint,4,opt,name=has_login,json=hasLogin,proto3" json:"has_login,omitempty"`
	// contains filtered or unexported fields
}

func (*FeedRequest) Descriptor deprecated

func (*FeedRequest) Descriptor() ([]byte, []int)

Deprecated: Use FeedRequest.ProtoReflect.Descriptor instead.

func (*FeedRequest) FastRead

func (x *FeedRequest) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

func (*FeedRequest) FastWrite

func (x *FeedRequest) FastWrite(buf []byte) (offset int)

func (*FeedRequest) GetHasLogin

func (x *FeedRequest) GetHasLogin() bool

func (*FeedRequest) GetId

func (x *FeedRequest) GetId() int64

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 {
	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" 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" 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) FastRead

func (x *FeedResponse) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

func (*FeedResponse) FastWrite

func (x *FeedResponse) FastWrite(buf []byte) (offset int)

func (*FeedResponse) GetNextTime

func (x *FeedResponse) GetNextTime() int64

func (*FeedResponse) GetStatusCode

func (x *FeedResponse) GetStatusCode() int32

func (*FeedResponse) GetStatusMsg

func (x *FeedResponse) GetStatusMsg() string

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 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) Descriptor() ([]byte, []int)

Deprecated: Use Video.ProtoReflect.Descriptor instead.

func (*Video) FastRead

func (x *Video) FastRead(buf []byte, _type int8, number int32) (offset int, err error)

func (*Video) FastWrite

func (x *Video) FastWrite(buf []byte) (offset int)

func (*Video) GetAuthor

func (x *Video) GetAuthor() *user.User

func (*Video) GetCommentCount

func (x *Video) GetCommentCount() int64

func (*Video) GetCoverUrl

func (x *Video) GetCoverUrl() string

func (*Video) GetFavoriteCount

func (x *Video) GetFavoriteCount() int64

func (*Video) GetId

func (x *Video) GetId() int64

func (*Video) GetIsFavorite

func (x *Video) GetIsFavorite() bool

func (*Video) GetPlayUrl

func (x *Video) GetPlayUrl() string

func (*Video) GetTitle

func (x *Video) GetTitle() string

func (*Video) ProtoMessage

func (*Video) ProtoMessage()

func (*Video) ProtoReflect

func (x *Video) ProtoReflect() protoreflect.Message

func (*Video) Reset

func (x *Video) Reset()

func (*Video) Size

func (x *Video) Size() (n int)

func (*Video) String

func (x *Video) String() string

Directories

Path Synopsis
Code generated by Kitex v0.7.0.
Code generated by Kitex v0.7.0.

Jump to

Keyboard shortcuts

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