pb

package
v0.0.0-...-f1d9293 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetFollowCount

func (x *User) GetFollowCount() int64

func (*User) GetFollowerCount

func (x *User) GetFollowerCount() int64

func (*User) GetId

func (x *User) GetId() int64

func (*User) GetIsFollow

func (x *User) GetIsFollow() bool

func (*User) GetName

func (x *User) GetName() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

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

Deprecated: Use Video.ProtoReflect.Descriptor instead.

func (*Video) GetAuthor

func (x *Video) GetAuthor() *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) String

func (x *Video) String() string

Jump to

Keyboard shortcuts

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