Documentation ¶
Index ¶
- Variables
- 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) GetNextTime() int64
- func (x *FeedResponse) GetStatusCode() int32
- func (x *FeedResponse) GetStatusMsg() string
- 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 PublishActionRequest
- func (*PublishActionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PublishActionRequest) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *PublishActionRequest) FastWrite(buf []byte) (offset int)
- func (x *PublishActionRequest) GetData() []byte
- func (x *PublishActionRequest) GetTitle() string
- func (x *PublishActionRequest) GetToken() string
- func (*PublishActionRequest) ProtoMessage()
- func (x *PublishActionRequest) ProtoReflect() protoreflect.Message
- func (x *PublishActionRequest) Reset()
- func (x *PublishActionRequest) Size() (n int)
- func (x *PublishActionRequest) String() string
- type PublishActionResponse
- func (*PublishActionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PublishActionResponse) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *PublishActionResponse) FastWrite(buf []byte) (offset int)
- func (x *PublishActionResponse) GetStatusCode() int32
- func (x *PublishActionResponse) GetStatusMsg() string
- func (*PublishActionResponse) ProtoMessage()
- func (x *PublishActionResponse) ProtoReflect() protoreflect.Message
- func (x *PublishActionResponse) Reset()
- func (x *PublishActionResponse) Size() (n int)
- func (x *PublishActionResponse) String() string
- type PublishListRequest
- func (*PublishListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PublishListRequest) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *PublishListRequest) FastWrite(buf []byte) (offset int)
- func (x *PublishListRequest) GetToken() string
- func (x *PublishListRequest) GetUserId() int64
- func (*PublishListRequest) ProtoMessage()
- func (x *PublishListRequest) ProtoReflect() protoreflect.Message
- func (x *PublishListRequest) Reset()
- func (x *PublishListRequest) Size() (n int)
- func (x *PublishListRequest) String() string
- type PublishListResponse
- func (*PublishListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PublishListResponse) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *PublishListResponse) FastWrite(buf []byte) (offset int)
- func (x *PublishListResponse) GetStatusCode() int32
- func (x *PublishListResponse) GetStatusMsg() string
- func (x *PublishListResponse) GetVideoList() []*Video
- func (*PublishListResponse) ProtoMessage()
- func (x *PublishListResponse) ProtoReflect() protoreflect.Message
- func (x *PublishListResponse) Reset()
- func (x *PublishListResponse) Size() (n int)
- func (x *PublishListResponse) 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.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_feed_proto protoreflect.FileDescriptor
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) 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) 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) 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) 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) 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) 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) 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.