Documentation ¶
Index ¶
- Variables
- func RegisterFeedServer(s *grpc.Server, srv FeedServer)
- 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 FeedClient
- type FeedServer
- type UnimplementedFeedServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- 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 (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type Video
- func (*Video) Descriptor() ([]byte, []int)deprecated
- 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) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_feed_proto protoreflect.FileDescriptor
Functions ¶
func RegisterFeedServer ¶
func RegisterFeedServer(s *grpc.Server, srv FeedServer)
Types ¶
type DouyinFeedRequest ¶
type DouyinFeedRequest struct { LatestTime *int64 `protobuf:"varint,1,opt,name=latest_time,json=latestTime" json:"latest_time,omitempty"` //可选参数,限制返回视频的最新投稿时间 Token *string `protobuf:"bytes,2,opt,name=token" 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,req,name=status_code,json=statusCode" json:"status_code,omitempty"` //状态码,0-成功,其他值-失败 StatusMsg *string `protobuf:"bytes,2,opt,name=status_msg,json=statusMsg" json:"status_msg,omitempty"` //返回状态描述 VideoList []*Video `protobuf:"bytes,3,rep,name=video_list,json=videoList" json:"video_list,omitempty"` //视频列表 NextTime *int64 `protobuf:"varint,4,opt,name=next_time,json=nextTime" json:"next_time,omitempty"` //本次返回的视频中发布最早的时间,作为下次请求的lastest_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 FeedClient ¶
type FeedClient interface {
GetFeed(ctx context.Context, in *DouyinFeedRequest, opts ...grpc.CallOption) (*DouyinFeedResponse, error)
}
FeedClient is the client API for Feed service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewFeedClient ¶
func NewFeedClient(cc grpc.ClientConnInterface) FeedClient
type FeedServer ¶
type FeedServer interface {
GetFeed(context.Context, *DouyinFeedRequest) (*DouyinFeedResponse, error)
}
FeedServer is the server API for Feed service.
type UnimplementedFeedServer ¶
type UnimplementedFeedServer struct { }
UnimplementedFeedServer can be embedded to have forward compatible implementations.
func (*UnimplementedFeedServer) GetFeed ¶
func (*UnimplementedFeedServer) GetFeed(context.Context, *DouyinFeedRequest) (*DouyinFeedResponse, error)
type User ¶
type User struct { Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` //用户id Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` //用户名称 FollowCount *int64 `protobuf:"varint,3,opt,name=follow_count,json=followCount" json:"follow_count,omitempty"` //关注总数 FollowerCount *int64 `protobuf:"varint,4,opt,name=follower_count,json=followerCount" json:"follower_count,omitempty"` //粉丝总数 IsFollow *bool `protobuf:"varint,5,req,name=is_follow,json=isFollow" json:"is_follow,omitempty"` //true-已关注,false-未关注 // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetFollowCount ¶
func (*User) GetFollowerCount ¶
func (*User) GetIsFollow ¶
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,req,name=id" json:"id,omitempty"` //视频唯一标识 Author *User `protobuf:"bytes,2,req,name=author" json:"author,omitempty"` //视频作者信息 PlayUrl *string `protobuf:"bytes,3,req,name=play_url,json=playUrl" json:"play_url,omitempty"` //视频播放地址 CoverUrl *string `protobuf:"bytes,4,req,name=cover_url,json=coverUrl" json:"cover_url,omitempty"` //视频封面地址 FavoriteCount *int64 `protobuf:"varint,5,req,name=favorite_count,json=favoriteCount" json:"favorite_count,omitempty"` //视频的点赞总数 CommentCount *int64 `protobuf:"varint,6,req,name=comment_count,json=commentCount" json:"comment_count,omitempty"` //视频的评论总数 IsFavorite *bool `protobuf:"varint,7,req,name=is_favorite,json=isFavorite" json:"is_favorite,omitempty"` //true-已点赞, false-未点赞 Title *string `protobuf:"bytes,8,req,name=title" 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.