feed

package
v0.0.0-...-49721f6 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 9 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" query:"latest_time,omitempty"` // 可选参数,限制返回视频的最新投稿时间戳,精确到秒,不填表示当前时间
	Token      string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty" query:"token,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) 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"` // 状态码,0-成功,其他值-失败
	StatusMsg  string   `protobuf:"bytes,2,opt,name=status_msg,json=statusMsg,proto3" json:"status_msg"`     // 返回状态描述
	VideoList  []*Video `protobuf:"bytes,3,rep,name=video_list,json=videoList,proto3" json:"video_list"`     // 视频列表
	NextTime   int64    `protobuf:"varint,4,opt,name=next_time,json=nextTime,proto3" json:"next_time"`       // 本次返回的视频中,发布最早的时间,作为下次请求时的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)
	PublishList(ctx context.Context, req *PublishListRequest) (res *PublishListResponse, err error)
	PublishAction(ctx context.Context, req *PublishActionRequest) (res *PublishActionResponse, err error)
}

type PublishActionRequest

type PublishActionRequest struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token" form:"token,required" query:"token"` // 用户鉴权token
	Data  []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data"`                                       // 视频数据
	Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title" form:"title,required" query:"title"` // 视频标题
	// contains filtered or unexported fields
}

func (*PublishActionRequest) Descriptor deprecated

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

Deprecated: Use PublishActionRequest.ProtoReflect.Descriptor instead.

func (*PublishActionRequest) FastRead

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

func (*PublishActionRequest) FastWrite

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

func (*PublishActionRequest) GetData

func (x *PublishActionRequest) GetData() []byte

func (*PublishActionRequest) GetTitle

func (x *PublishActionRequest) GetTitle() string

func (*PublishActionRequest) GetToken

func (x *PublishActionRequest) GetToken() string

func (*PublishActionRequest) ProtoMessage

func (*PublishActionRequest) ProtoMessage()

func (*PublishActionRequest) ProtoReflect

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

func (*PublishActionRequest) Reset

func (x *PublishActionRequest) Reset()

func (*PublishActionRequest) Size

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

func (*PublishActionRequest) String

func (x *PublishActionRequest) String() string

type PublishActionResponse

type PublishActionResponse struct {
	StatusCode int32  `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code"` // 状态码,0-成功,其他值-失败
	StatusMsg  string `protobuf:"bytes,2,opt,name=status_msg,json=statusMsg,proto3" json:"status_msg"`     // 返回状态描述
	// contains filtered or unexported fields
}

func (*PublishActionResponse) Descriptor deprecated

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

Deprecated: Use PublishActionResponse.ProtoReflect.Descriptor instead.

func (*PublishActionResponse) FastRead

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

func (*PublishActionResponse) FastWrite

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

func (*PublishActionResponse) GetStatusCode

func (x *PublishActionResponse) GetStatusCode() int32

func (*PublishActionResponse) GetStatusMsg

func (x *PublishActionResponse) GetStatusMsg() string

func (*PublishActionResponse) ProtoMessage

func (*PublishActionResponse) ProtoMessage()

func (*PublishActionResponse) ProtoReflect

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

func (*PublishActionResponse) Reset

func (x *PublishActionResponse) Reset()

func (*PublishActionResponse) Size

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

func (*PublishActionResponse) String

func (x *PublishActionResponse) String() string

type PublishListRequest

type PublishListRequest struct {
	UserId int64  `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id" query:"user_id"` // 用户id
	Token  string `protobuf:"bytes,2,opt,name=token,proto3" json:"token" query:"token"`                    // 用户鉴权token
	// contains filtered or unexported fields
}

func (*PublishListRequest) Descriptor deprecated

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

Deprecated: Use PublishListRequest.ProtoReflect.Descriptor instead.

func (*PublishListRequest) FastRead

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

func (*PublishListRequest) FastWrite

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

func (*PublishListRequest) GetToken

func (x *PublishListRequest) GetToken() string

func (*PublishListRequest) GetUserId

func (x *PublishListRequest) GetUserId() int64

func (*PublishListRequest) ProtoMessage

func (*PublishListRequest) ProtoMessage()

func (*PublishListRequest) ProtoReflect

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

func (*PublishListRequest) Reset

func (x *PublishListRequest) Reset()

func (*PublishListRequest) Size

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

func (*PublishListRequest) String

func (x *PublishListRequest) String() string

type PublishListResponse

type PublishListResponse struct {
	StatusCode int32    `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code"` // 状态码,0-成功,其他值-失败
	StatusMsg  string   `protobuf:"bytes,2,opt,name=status_msg,json=statusMsg,proto3" json:"status_msg"`     // 返回状态描述
	VideoList  []*Video `protobuf:"bytes,3,rep,name=video_list,json=videoList,proto3" json:"video_list"`     // 用户发布的视频列表
	// contains filtered or unexported fields
}

func (*PublishListResponse) Descriptor deprecated

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

Deprecated: Use PublishListResponse.ProtoReflect.Descriptor instead.

func (*PublishListResponse) FastRead

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

func (*PublishListResponse) FastWrite

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

func (*PublishListResponse) GetStatusCode

func (x *PublishListResponse) GetStatusCode() int32

func (*PublishListResponse) GetStatusMsg

func (x *PublishListResponse) GetStatusMsg() string

func (*PublishListResponse) GetVideoList

func (x *PublishListResponse) GetVideoList() []*Video

func (*PublishListResponse) ProtoMessage

func (*PublishListResponse) ProtoMessage()

func (*PublishListResponse) ProtoReflect

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

func (*PublishListResponse) Reset

func (x *PublishListResponse) Reset()

func (*PublishListResponse) Size

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

func (*PublishListResponse) String

func (x *PublishListResponse) String() string

type Video

type Video struct {
	Id            int64      `protobuf:"varint,1,opt,name=id,proto3" json:"id"`                                            // 视频唯一标识
	Author        *user.User `protobuf:"bytes,2,opt,name=author,proto3" json:"author"`                                     // 视频作者信息
	PlayUrl       string     `protobuf:"bytes,3,opt,name=play_url,json=playUrl,proto3" json:"play_url"`                    // 视频播放地址
	CoverUrl      string     `protobuf:"bytes,4,opt,name=cover_url,json=coverUrl,proto3" json:"cover_url"`                 // 视频封面地址
	FavoriteCount int64      `protobuf:"varint,5,opt,name=favorite_count,json=favoriteCount,proto3" json:"favorite_count"` // 视频的点赞总数
	CommentCount  int64      `protobuf:"varint,6,opt,name=comment_count,json=commentCount,proto3" json:"comment_count"`    // 视频的评论总数
	IsFavorite    bool       `protobuf:"varint,7,opt,name=is_favorite,json=isFavorite,proto3" json:"is_favorite"`          // true-已点赞,false-未点赞
	Title         string     `protobuf:"bytes,8,opt,name=title,proto3" json:"title"`                                       // 视频标题
	// 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.6.2.
Code generated by Kitex v0.6.2.

Jump to

Keyboard shortcuts

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