Documentation
¶
Index ¶
- Variables
- func RegisterPublishServer(s grpc.ServiceRegistrar, srv PublishServer)
- type DouyinPublishListRequest
- func (*DouyinPublishListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DouyinPublishListRequest) GetToken() string
- func (x *DouyinPublishListRequest) GetUserId() int64
- func (*DouyinPublishListRequest) ProtoMessage()
- func (x *DouyinPublishListRequest) ProtoReflect() protoreflect.Message
- func (x *DouyinPublishListRequest) Reset()
- func (x *DouyinPublishListRequest) String() string
- type DouyinPublishListResponse
- func (*DouyinPublishListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DouyinPublishListResponse) GetStatusCode() int32
- func (x *DouyinPublishListResponse) GetStatusMsg() string
- func (x *DouyinPublishListResponse) GetVideoList() []*Video
- func (*DouyinPublishListResponse) ProtoMessage()
- func (x *DouyinPublishListResponse) ProtoReflect() protoreflect.Message
- func (x *DouyinPublishListResponse) Reset()
- func (x *DouyinPublishListResponse) String() string
- type PublishClient
- type PublishServer
- type UnimplementedPublishServer
- type UnsafePublishServer
- 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 ¶
var File_publist_proto protoreflect.FileDescriptor
var Publish_ServiceDesc = grpc.ServiceDesc{ ServiceName: "douyin.core.publist.publish", HandlerType: (*PublishServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "publish_video", Handler: _Publish_PublishVideo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "publist.proto", }
Publish_ServiceDesc is the grpc.ServiceDesc for Publish service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPublishServer ¶
func RegisterPublishServer(s grpc.ServiceRegistrar, srv PublishServer)
Types ¶
type DouyinPublishListRequest ¶
type DouyinPublishListRequest struct { UserId *int64 `protobuf:"varint,1,req,name=user_id,json=userId" json:"user_id,omitempty"` //用户id Token *string `protobuf:"bytes,2,req,name=token" json:"token,omitempty"` //用户鉴权token // contains filtered or unexported fields }
func (*DouyinPublishListRequest) Descriptor
deprecated
func (*DouyinPublishListRequest) Descriptor() ([]byte, []int)
Deprecated: Use DouyinPublishListRequest.ProtoReflect.Descriptor instead.
func (*DouyinPublishListRequest) GetToken ¶
func (x *DouyinPublishListRequest) GetToken() string
func (*DouyinPublishListRequest) GetUserId ¶
func (x *DouyinPublishListRequest) GetUserId() int64
func (*DouyinPublishListRequest) ProtoMessage ¶
func (*DouyinPublishListRequest) ProtoMessage()
func (*DouyinPublishListRequest) ProtoReflect ¶
func (x *DouyinPublishListRequest) ProtoReflect() protoreflect.Message
func (*DouyinPublishListRequest) Reset ¶
func (x *DouyinPublishListRequest) Reset()
func (*DouyinPublishListRequest) String ¶
func (x *DouyinPublishListRequest) String() string
type DouyinPublishListResponse ¶
type DouyinPublishListResponse struct { //状态码,0-成功,其他值-失败 StatusCode *int32 `protobuf:"varint,1,req,name=status_code,json=statusCode" json:"status_code,omitempty"` //返回状态描述 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"` // contains filtered or unexported fields }
func (*DouyinPublishListResponse) Descriptor
deprecated
func (*DouyinPublishListResponse) Descriptor() ([]byte, []int)
Deprecated: Use DouyinPublishListResponse.ProtoReflect.Descriptor instead.
func (*DouyinPublishListResponse) GetStatusCode ¶
func (x *DouyinPublishListResponse) GetStatusCode() int32
func (*DouyinPublishListResponse) GetStatusMsg ¶
func (x *DouyinPublishListResponse) GetStatusMsg() string
func (*DouyinPublishListResponse) GetVideoList ¶
func (x *DouyinPublishListResponse) GetVideoList() []*Video
func (*DouyinPublishListResponse) ProtoMessage ¶
func (*DouyinPublishListResponse) ProtoMessage()
func (*DouyinPublishListResponse) ProtoReflect ¶
func (x *DouyinPublishListResponse) ProtoReflect() protoreflect.Message
func (*DouyinPublishListResponse) Reset ¶
func (x *DouyinPublishListResponse) Reset()
func (*DouyinPublishListResponse) String ¶
func (x *DouyinPublishListResponse) String() string
type PublishClient ¶
type PublishClient interface {
PublishVideo(ctx context.Context, in *DouyinPublishListRequest, opts ...grpc.CallOption) (*DouyinPublishListResponse, error)
}
PublishClient is the client API for Publish service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewPublishClient ¶
func NewPublishClient(cc grpc.ClientConnInterface) PublishClient
type PublishServer ¶
type PublishServer interface { PublishVideo(context.Context, *DouyinPublishListRequest) (*DouyinPublishListResponse, error) // contains filtered or unexported methods }
PublishServer is the server API for Publish service. All implementations must embed UnimplementedPublishServer for forward compatibility
type UnimplementedPublishServer ¶
type UnimplementedPublishServer struct { }
UnimplementedPublishServer must be embedded to have forward compatible implementations.
func (UnimplementedPublishServer) PublishVideo ¶
func (UnimplementedPublishServer) PublishVideo(context.Context, *DouyinPublishListRequest) (*DouyinPublishListResponse, error)
type UnsafePublishServer ¶
type UnsafePublishServer interface {
// contains filtered or unexported methods
}
UnsafePublishServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PublishServer will result in compilation errors.
type User ¶
type User struct { //用户id Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` //用户名称 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"` // true-已关注,false-未关注 IsFollow *bool `protobuf:"varint,5,req,name=is_follow,json=isFollow" json:"is_follow,omitempty"` // 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"` //true-已点赞,faLse-未点赞 IsFavorite *bool `protobuf:"varint,7,req,name=is_favorite,json=isFavorite" json:"is_favorite,omitempty"` //视频标题 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