Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterFavoriteServiceHTTPServer(s *http.Server, srv FavoriteServiceHTTPServer)
- func RegisterFavoriteServiceServer(s grpc.ServiceRegistrar, srv FavoriteServiceServer)
- type FavoriteActionReply
- func (*FavoriteActionReply) Descriptor() ([]byte, []int)deprecated
- func (x *FavoriteActionReply) GetStatusCode() int32
- func (x *FavoriteActionReply) GetStatusMsg() string
- func (*FavoriteActionReply) ProtoMessage()
- func (x *FavoriteActionReply) ProtoReflect() protoreflect.Message
- func (x *FavoriteActionReply) Reset()
- func (x *FavoriteActionReply) String() string
- func (m *FavoriteActionReply) Validate() error
- func (m *FavoriteActionReply) ValidateAll() error
- type FavoriteActionReplyMultiError
- type FavoriteActionReplyValidationError
- func (e FavoriteActionReplyValidationError) Cause() error
- func (e FavoriteActionReplyValidationError) Error() string
- func (e FavoriteActionReplyValidationError) ErrorName() string
- func (e FavoriteActionReplyValidationError) Field() string
- func (e FavoriteActionReplyValidationError) Key() bool
- func (e FavoriteActionReplyValidationError) Reason() string
- type FavoriteActionRequest
- func (*FavoriteActionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FavoriteActionRequest) GetActionType() uint32
- func (x *FavoriteActionRequest) GetToken() string
- func (x *FavoriteActionRequest) GetVideoId() uint32
- func (*FavoriteActionRequest) ProtoMessage()
- func (x *FavoriteActionRequest) ProtoReflect() protoreflect.Message
- func (x *FavoriteActionRequest) Reset()
- func (x *FavoriteActionRequest) String() string
- func (m *FavoriteActionRequest) Validate() error
- func (m *FavoriteActionRequest) ValidateAll() error
- type FavoriteActionRequestMultiError
- type FavoriteActionRequestValidationError
- func (e FavoriteActionRequestValidationError) Cause() error
- func (e FavoriteActionRequestValidationError) Error() string
- func (e FavoriteActionRequestValidationError) ErrorName() string
- func (e FavoriteActionRequestValidationError) Field() string
- func (e FavoriteActionRequestValidationError) Key() bool
- func (e FavoriteActionRequestValidationError) Reason() string
- type FavoriteListReply
- func (*FavoriteListReply) Descriptor() ([]byte, []int)deprecated
- func (x *FavoriteListReply) GetStatusCode() int32
- func (x *FavoriteListReply) GetStatusMsg() string
- func (x *FavoriteListReply) GetVideoList() []*Video
- func (*FavoriteListReply) ProtoMessage()
- func (x *FavoriteListReply) ProtoReflect() protoreflect.Message
- func (x *FavoriteListReply) Reset()
- func (x *FavoriteListReply) String() string
- func (m *FavoriteListReply) Validate() error
- func (m *FavoriteListReply) ValidateAll() error
- type FavoriteListReplyMultiError
- type FavoriteListReplyValidationError
- func (e FavoriteListReplyValidationError) Cause() error
- func (e FavoriteListReplyValidationError) Error() string
- func (e FavoriteListReplyValidationError) ErrorName() string
- func (e FavoriteListReplyValidationError) Field() string
- func (e FavoriteListReplyValidationError) Key() bool
- func (e FavoriteListReplyValidationError) Reason() string
- type FavoriteListRequest
- func (*FavoriteListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FavoriteListRequest) GetToken() string
- func (x *FavoriteListRequest) GetUserId() uint32
- func (*FavoriteListRequest) ProtoMessage()
- func (x *FavoriteListRequest) ProtoReflect() protoreflect.Message
- func (x *FavoriteListRequest) Reset()
- func (x *FavoriteListRequest) String() string
- func (m *FavoriteListRequest) Validate() error
- func (m *FavoriteListRequest) ValidateAll() error
- type FavoriteListRequestMultiError
- type FavoriteListRequestValidationError
- func (e FavoriteListRequestValidationError) Cause() error
- func (e FavoriteListRequestValidationError) Error() string
- func (e FavoriteListRequestValidationError) ErrorName() string
- func (e FavoriteListRequestValidationError) Field() string
- func (e FavoriteListRequestValidationError) Key() bool
- func (e FavoriteListRequestValidationError) Reason() string
- type FavoriteServiceClient
- type FavoriteServiceHTTPClient
- type FavoriteServiceHTTPClientImpl
- func (c *FavoriteServiceHTTPClientImpl) FavoriteAction(ctx context.Context, in *FavoriteActionRequest, opts ...http.CallOption) (*FavoriteActionReply, error)
- func (c *FavoriteServiceHTTPClientImpl) GetFavoriteList(ctx context.Context, in *FavoriteListRequest, opts ...http.CallOption) (*FavoriteListReply, error)
- type FavoriteServiceHTTPServer
- type FavoriteServiceServer
- type IsFavoriteReply
- func (*IsFavoriteReply) Descriptor() ([]byte, []int)deprecated
- func (x *IsFavoriteReply) GetIsFavorite() []bool
- func (*IsFavoriteReply) ProtoMessage()
- func (x *IsFavoriteReply) ProtoReflect() protoreflect.Message
- func (x *IsFavoriteReply) Reset()
- func (x *IsFavoriteReply) String() string
- func (m *IsFavoriteReply) Validate() error
- func (m *IsFavoriteReply) ValidateAll() error
- type IsFavoriteReplyMultiError
- type IsFavoriteReplyValidationError
- func (e IsFavoriteReplyValidationError) Cause() error
- func (e IsFavoriteReplyValidationError) Error() string
- func (e IsFavoriteReplyValidationError) ErrorName() string
- func (e IsFavoriteReplyValidationError) Field() string
- func (e IsFavoriteReplyValidationError) Key() bool
- func (e IsFavoriteReplyValidationError) Reason() string
- type IsFavoriteRequest
- func (*IsFavoriteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *IsFavoriteRequest) GetUserId() uint32
- func (x *IsFavoriteRequest) GetVideoIds() []uint32
- func (*IsFavoriteRequest) ProtoMessage()
- func (x *IsFavoriteRequest) ProtoReflect() protoreflect.Message
- func (x *IsFavoriteRequest) Reset()
- func (x *IsFavoriteRequest) String() string
- func (m *IsFavoriteRequest) Validate() error
- func (m *IsFavoriteRequest) ValidateAll() error
- type IsFavoriteRequestMultiError
- type IsFavoriteRequestValidationError
- func (e IsFavoriteRequestValidationError) Cause() error
- func (e IsFavoriteRequestValidationError) Error() string
- func (e IsFavoriteRequestValidationError) ErrorName() string
- func (e IsFavoriteRequestValidationError) Field() string
- func (e IsFavoriteRequestValidationError) Key() bool
- func (e IsFavoriteRequestValidationError) Reason() string
- type UnimplementedFavoriteServiceServer
- func (UnimplementedFavoriteServiceServer) FavoriteAction(context.Context, *FavoriteActionRequest) (*FavoriteActionReply, error)
- func (UnimplementedFavoriteServiceServer) GetFavoriteList(context.Context, *FavoriteListRequest) (*FavoriteListReply, error)
- func (UnimplementedFavoriteServiceServer) IsFavorite(context.Context, *IsFavoriteRequest) (*IsFavoriteReply, error)
- type UnsafeFavoriteServiceServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAvatar() string
- func (x *User) GetBackgroundImage() string
- func (x *User) GetFavoriteCount() uint32
- func (x *User) GetFollowCount() uint32
- func (x *User) GetFollowerCount() uint32
- func (x *User) GetId() uint32
- func (x *User) GetIsFollow() bool
- func (x *User) GetName() string
- func (x *User) GetSignature() string
- func (x *User) GetTotalFavorited() uint32
- func (x *User) GetWorkCount() uint32
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- func (m *User) Validate() error
- func (m *User) ValidateAll() error
- type UserMultiError
- type UserValidationError
- type Video
- func (*Video) Descriptor() ([]byte, []int)deprecated
- func (x *Video) GetAuthor() *User
- func (x *Video) GetCommentCount() uint32
- func (x *Video) GetCoverUrl() string
- func (x *Video) GetFavoriteCount() uint32
- func (x *Video) GetId() uint32
- 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
- func (m *Video) Validate() error
- func (m *Video) ValidateAll() error
- type VideoMultiError
- type VideoValidationError
Constants ¶
const ( FavoriteService_GetFavoriteList_FullMethodName = "/favorite.service.v1.FavoriteService/GetFavoriteList" FavoriteService_FavoriteAction_FullMethodName = "/favorite.service.v1.FavoriteService/FavoriteAction" FavoriteService_IsFavorite_FullMethodName = "/favorite.service.v1.FavoriteService/IsFavorite" )
const OperationFavoriteServiceFavoriteAction = "/favorite.service.v1.FavoriteService/FavoriteAction"
const OperationFavoriteServiceGetFavoriteList = "/favorite.service.v1.FavoriteService/GetFavoriteList"
Variables ¶
var FavoriteService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "favorite.service.v1.FavoriteService", HandlerType: (*FavoriteServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetFavoriteList", Handler: _FavoriteService_GetFavoriteList_Handler, }, { MethodName: "FavoriteAction", Handler: _FavoriteService_FavoriteAction_Handler, }, { MethodName: "IsFavorite", Handler: _FavoriteService_IsFavorite_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "favorite/service/v1/favorite.proto", }
FavoriteService_ServiceDesc is the grpc.ServiceDesc for FavoriteService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_favorite_service_v1_favorite_proto protoreflect.FileDescriptor
Functions ¶
func RegisterFavoriteServiceHTTPServer ¶
func RegisterFavoriteServiceHTTPServer(s *http.Server, srv FavoriteServiceHTTPServer)
func RegisterFavoriteServiceServer ¶
func RegisterFavoriteServiceServer(s grpc.ServiceRegistrar, srv FavoriteServiceServer)
Types ¶
type FavoriteActionReply ¶
type FavoriteActionReply struct { // 状态码,0-成功,其他值-失败 StatusCode int32 `protobuf:"varint,1,opt,name=status_code,proto3" json:"status_code,omitempty"` // 返回状态描述 StatusMsg string `protobuf:"bytes,2,opt,name=status_msg,proto3" json:"status_msg,omitempty"` // contains filtered or unexported fields }
func (*FavoriteActionReply) Descriptor
deprecated
func (*FavoriteActionReply) Descriptor() ([]byte, []int)
Deprecated: Use FavoriteActionReply.ProtoReflect.Descriptor instead.
func (*FavoriteActionReply) GetStatusCode ¶
func (x *FavoriteActionReply) GetStatusCode() int32
func (*FavoriteActionReply) GetStatusMsg ¶
func (x *FavoriteActionReply) GetStatusMsg() string
func (*FavoriteActionReply) ProtoMessage ¶
func (*FavoriteActionReply) ProtoMessage()
func (*FavoriteActionReply) ProtoReflect ¶
func (x *FavoriteActionReply) ProtoReflect() protoreflect.Message
func (*FavoriteActionReply) Reset ¶
func (x *FavoriteActionReply) Reset()
func (*FavoriteActionReply) String ¶
func (x *FavoriteActionReply) String() string
func (*FavoriteActionReply) Validate ¶
func (m *FavoriteActionReply) Validate() error
Validate checks the field values on FavoriteActionReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*FavoriteActionReply) ValidateAll ¶
func (m *FavoriteActionReply) ValidateAll() error
ValidateAll checks the field values on FavoriteActionReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in FavoriteActionReplyMultiError, or nil if none found.
type FavoriteActionReplyMultiError ¶
type FavoriteActionReplyMultiError []error
FavoriteActionReplyMultiError is an error wrapping multiple validation errors returned by FavoriteActionReply.ValidateAll() if the designated constraints aren't met.
func (FavoriteActionReplyMultiError) AllErrors ¶
func (m FavoriteActionReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (FavoriteActionReplyMultiError) Error ¶
func (m FavoriteActionReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type FavoriteActionReplyValidationError ¶
type FavoriteActionReplyValidationError struct {
// contains filtered or unexported fields
}
FavoriteActionReplyValidationError is the validation error returned by FavoriteActionReply.Validate if the designated constraints aren't met.
func (FavoriteActionReplyValidationError) Cause ¶
func (e FavoriteActionReplyValidationError) Cause() error
Cause function returns cause value.
func (FavoriteActionReplyValidationError) Error ¶
func (e FavoriteActionReplyValidationError) Error() string
Error satisfies the builtin error interface
func (FavoriteActionReplyValidationError) ErrorName ¶
func (e FavoriteActionReplyValidationError) ErrorName() string
ErrorName returns error name.
func (FavoriteActionReplyValidationError) Field ¶
func (e FavoriteActionReplyValidationError) Field() string
Field function returns field value.
func (FavoriteActionReplyValidationError) Key ¶
func (e FavoriteActionReplyValidationError) Key() bool
Key function returns key value.
func (FavoriteActionReplyValidationError) Reason ¶
func (e FavoriteActionReplyValidationError) Reason() string
Reason function returns reason value.
type FavoriteActionRequest ¶
type FavoriteActionRequest struct { // 用户鉴权 token Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // 需要操作的视频 id VideoId uint32 `protobuf:"varint,2,opt,name=video_id,json=videoId,proto3" json:"video_id,omitempty"` // 1-点赞,2-取消点赞 ActionType uint32 `protobuf:"varint,3,opt,name=action_type,json=actionType,proto3" json:"action_type,omitempty"` // contains filtered or unexported fields }
func (*FavoriteActionRequest) Descriptor
deprecated
func (*FavoriteActionRequest) Descriptor() ([]byte, []int)
Deprecated: Use FavoriteActionRequest.ProtoReflect.Descriptor instead.
func (*FavoriteActionRequest) GetActionType ¶
func (x *FavoriteActionRequest) GetActionType() uint32
func (*FavoriteActionRequest) GetToken ¶
func (x *FavoriteActionRequest) GetToken() string
func (*FavoriteActionRequest) GetVideoId ¶
func (x *FavoriteActionRequest) GetVideoId() uint32
func (*FavoriteActionRequest) ProtoMessage ¶
func (*FavoriteActionRequest) ProtoMessage()
func (*FavoriteActionRequest) ProtoReflect ¶
func (x *FavoriteActionRequest) ProtoReflect() protoreflect.Message
func (*FavoriteActionRequest) Reset ¶
func (x *FavoriteActionRequest) Reset()
func (*FavoriteActionRequest) String ¶
func (x *FavoriteActionRequest) String() string
func (*FavoriteActionRequest) Validate ¶
func (m *FavoriteActionRequest) Validate() error
Validate checks the field values on FavoriteActionRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*FavoriteActionRequest) ValidateAll ¶
func (m *FavoriteActionRequest) ValidateAll() error
ValidateAll checks the field values on FavoriteActionRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in FavoriteActionRequestMultiError, or nil if none found.
type FavoriteActionRequestMultiError ¶
type FavoriteActionRequestMultiError []error
FavoriteActionRequestMultiError is an error wrapping multiple validation errors returned by FavoriteActionRequest.ValidateAll() if the designated constraints aren't met.
func (FavoriteActionRequestMultiError) AllErrors ¶
func (m FavoriteActionRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (FavoriteActionRequestMultiError) Error ¶
func (m FavoriteActionRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type FavoriteActionRequestValidationError ¶
type FavoriteActionRequestValidationError struct {
// contains filtered or unexported fields
}
FavoriteActionRequestValidationError is the validation error returned by FavoriteActionRequest.Validate if the designated constraints aren't met.
func (FavoriteActionRequestValidationError) Cause ¶
func (e FavoriteActionRequestValidationError) Cause() error
Cause function returns cause value.
func (FavoriteActionRequestValidationError) Error ¶
func (e FavoriteActionRequestValidationError) Error() string
Error satisfies the builtin error interface
func (FavoriteActionRequestValidationError) ErrorName ¶
func (e FavoriteActionRequestValidationError) ErrorName() string
ErrorName returns error name.
func (FavoriteActionRequestValidationError) Field ¶
func (e FavoriteActionRequestValidationError) Field() string
Field function returns field value.
func (FavoriteActionRequestValidationError) Key ¶
func (e FavoriteActionRequestValidationError) Key() bool
Key function returns key value.
func (FavoriteActionRequestValidationError) Reason ¶
func (e FavoriteActionRequestValidationError) Reason() string
Reason function returns reason value.
type FavoriteListReply ¶
type FavoriteListReply struct { // 状态码,0-成功,其他值-失败 StatusCode int32 `protobuf:"varint,1,opt,name=status_code,proto3" json:"status_code,omitempty"` // 返回状态描述 StatusMsg string `protobuf:"bytes,2,opt,name=status_msg,proto3" json:"status_msg,omitempty"` // 视频信息列表,按照发布时间倒序排列 VideoList []*Video `protobuf:"bytes,3,rep,name=video_list,proto3" json:"video_list,omitempty"` // contains filtered or unexported fields }
func (*FavoriteListReply) Descriptor
deprecated
func (*FavoriteListReply) Descriptor() ([]byte, []int)
Deprecated: Use FavoriteListReply.ProtoReflect.Descriptor instead.
func (*FavoriteListReply) GetStatusCode ¶
func (x *FavoriteListReply) GetStatusCode() int32
func (*FavoriteListReply) GetStatusMsg ¶
func (x *FavoriteListReply) GetStatusMsg() string
func (*FavoriteListReply) GetVideoList ¶
func (x *FavoriteListReply) GetVideoList() []*Video
func (*FavoriteListReply) ProtoMessage ¶
func (*FavoriteListReply) ProtoMessage()
func (*FavoriteListReply) ProtoReflect ¶
func (x *FavoriteListReply) ProtoReflect() protoreflect.Message
func (*FavoriteListReply) Reset ¶
func (x *FavoriteListReply) Reset()
func (*FavoriteListReply) String ¶
func (x *FavoriteListReply) String() string
func (*FavoriteListReply) Validate ¶
func (m *FavoriteListReply) Validate() error
Validate checks the field values on FavoriteListReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*FavoriteListReply) ValidateAll ¶
func (m *FavoriteListReply) ValidateAll() error
ValidateAll checks the field values on FavoriteListReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in FavoriteListReplyMultiError, or nil if none found.
type FavoriteListReplyMultiError ¶
type FavoriteListReplyMultiError []error
FavoriteListReplyMultiError is an error wrapping multiple validation errors returned by FavoriteListReply.ValidateAll() if the designated constraints aren't met.
func (FavoriteListReplyMultiError) AllErrors ¶
func (m FavoriteListReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (FavoriteListReplyMultiError) Error ¶
func (m FavoriteListReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type FavoriteListReplyValidationError ¶
type FavoriteListReplyValidationError struct {
// contains filtered or unexported fields
}
FavoriteListReplyValidationError is the validation error returned by FavoriteListReply.Validate if the designated constraints aren't met.
func (FavoriteListReplyValidationError) Cause ¶
func (e FavoriteListReplyValidationError) Cause() error
Cause function returns cause value.
func (FavoriteListReplyValidationError) Error ¶
func (e FavoriteListReplyValidationError) Error() string
Error satisfies the builtin error interface
func (FavoriteListReplyValidationError) ErrorName ¶
func (e FavoriteListReplyValidationError) ErrorName() string
ErrorName returns error name.
func (FavoriteListReplyValidationError) Field ¶
func (e FavoriteListReplyValidationError) Field() string
Field function returns field value.
func (FavoriteListReplyValidationError) Key ¶
func (e FavoriteListReplyValidationError) Key() bool
Key function returns key value.
func (FavoriteListReplyValidationError) Reason ¶
func (e FavoriteListReplyValidationError) Reason() string
Reason function returns reason value.
type FavoriteListRequest ¶
type FavoriteListRequest struct { // 需要查询的用户 id UserId uint32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 用户鉴权 token Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*FavoriteListRequest) Descriptor
deprecated
func (*FavoriteListRequest) Descriptor() ([]byte, []int)
Deprecated: Use FavoriteListRequest.ProtoReflect.Descriptor instead.
func (*FavoriteListRequest) GetToken ¶
func (x *FavoriteListRequest) GetToken() string
func (*FavoriteListRequest) GetUserId ¶
func (x *FavoriteListRequest) GetUserId() uint32
func (*FavoriteListRequest) ProtoMessage ¶
func (*FavoriteListRequest) ProtoMessage()
func (*FavoriteListRequest) ProtoReflect ¶
func (x *FavoriteListRequest) ProtoReflect() protoreflect.Message
func (*FavoriteListRequest) Reset ¶
func (x *FavoriteListRequest) Reset()
func (*FavoriteListRequest) String ¶
func (x *FavoriteListRequest) String() string
func (*FavoriteListRequest) Validate ¶
func (m *FavoriteListRequest) Validate() error
Validate checks the field values on FavoriteListRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*FavoriteListRequest) ValidateAll ¶
func (m *FavoriteListRequest) ValidateAll() error
ValidateAll checks the field values on FavoriteListRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in FavoriteListRequestMultiError, or nil if none found.
type FavoriteListRequestMultiError ¶
type FavoriteListRequestMultiError []error
FavoriteListRequestMultiError is an error wrapping multiple validation errors returned by FavoriteListRequest.ValidateAll() if the designated constraints aren't met.
func (FavoriteListRequestMultiError) AllErrors ¶
func (m FavoriteListRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (FavoriteListRequestMultiError) Error ¶
func (m FavoriteListRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type FavoriteListRequestValidationError ¶
type FavoriteListRequestValidationError struct {
// contains filtered or unexported fields
}
FavoriteListRequestValidationError is the validation error returned by FavoriteListRequest.Validate if the designated constraints aren't met.
func (FavoriteListRequestValidationError) Cause ¶
func (e FavoriteListRequestValidationError) Cause() error
Cause function returns cause value.
func (FavoriteListRequestValidationError) Error ¶
func (e FavoriteListRequestValidationError) Error() string
Error satisfies the builtin error interface
func (FavoriteListRequestValidationError) ErrorName ¶
func (e FavoriteListRequestValidationError) ErrorName() string
ErrorName returns error name.
func (FavoriteListRequestValidationError) Field ¶
func (e FavoriteListRequestValidationError) Field() string
Field function returns field value.
func (FavoriteListRequestValidationError) Key ¶
func (e FavoriteListRequestValidationError) Key() bool
Key function returns key value.
func (FavoriteListRequestValidationError) Reason ¶
func (e FavoriteListRequestValidationError) Reason() string
Reason function returns reason value.
type FavoriteServiceClient ¶
type FavoriteServiceClient interface { // 获取喜爱视频列表 GetFavoriteList(ctx context.Context, in *FavoriteListRequest, opts ...grpc.CallOption) (*FavoriteListReply, error) // 添加或取消喜爱视频 FavoriteAction(ctx context.Context, in *FavoriteActionRequest, opts ...grpc.CallOption) (*FavoriteActionReply, error) // 其他服务根据 user_id 和 video_ids 判断是否喜爱 IsFavorite(ctx context.Context, in *IsFavoriteRequest, opts ...grpc.CallOption) (*IsFavoriteReply, error) }
FavoriteServiceClient is the client API for FavoriteService 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 NewFavoriteServiceClient ¶
func NewFavoriteServiceClient(cc grpc.ClientConnInterface) FavoriteServiceClient
type FavoriteServiceHTTPClient ¶
type FavoriteServiceHTTPClient interface { FavoriteAction(ctx context.Context, req *FavoriteActionRequest, opts ...http.CallOption) (rsp *FavoriteActionReply, err error) GetFavoriteList(ctx context.Context, req *FavoriteListRequest, opts ...http.CallOption) (rsp *FavoriteListReply, err error) }
func NewFavoriteServiceHTTPClient ¶
func NewFavoriteServiceHTTPClient(client *http.Client) FavoriteServiceHTTPClient
type FavoriteServiceHTTPClientImpl ¶
type FavoriteServiceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*FavoriteServiceHTTPClientImpl) FavoriteAction ¶
func (c *FavoriteServiceHTTPClientImpl) FavoriteAction(ctx context.Context, in *FavoriteActionRequest, opts ...http.CallOption) (*FavoriteActionReply, error)
func (*FavoriteServiceHTTPClientImpl) GetFavoriteList ¶
func (c *FavoriteServiceHTTPClientImpl) GetFavoriteList(ctx context.Context, in *FavoriteListRequest, opts ...http.CallOption) (*FavoriteListReply, error)
type FavoriteServiceHTTPServer ¶
type FavoriteServiceHTTPServer interface { // FavoriteAction 添加或取消喜爱视频 FavoriteAction(context.Context, *FavoriteActionRequest) (*FavoriteActionReply, error) // GetFavoriteList 获取喜爱视频列表 GetFavoriteList(context.Context, *FavoriteListRequest) (*FavoriteListReply, error) }
type FavoriteServiceServer ¶
type FavoriteServiceServer interface { // 获取喜爱视频列表 GetFavoriteList(context.Context, *FavoriteListRequest) (*FavoriteListReply, error) // 添加或取消喜爱视频 FavoriteAction(context.Context, *FavoriteActionRequest) (*FavoriteActionReply, error) // 其他服务根据 user_id 和 video_ids 判断是否喜爱 IsFavorite(context.Context, *IsFavoriteRequest) (*IsFavoriteReply, error) // contains filtered or unexported methods }
FavoriteServiceServer is the server API for FavoriteService service. All implementations must embed UnimplementedFavoriteServiceServer for forward compatibility
type IsFavoriteReply ¶
type IsFavoriteReply struct { // 根据请求的视频 id 顺序返回是否喜爱 // true-已点赞,false-未点赞 IsFavorite []bool `protobuf:"varint,1,rep,packed,name=is_favorite,json=isFavorite,proto3" json:"is_favorite,omitempty"` // contains filtered or unexported fields }
func (*IsFavoriteReply) Descriptor
deprecated
func (*IsFavoriteReply) Descriptor() ([]byte, []int)
Deprecated: Use IsFavoriteReply.ProtoReflect.Descriptor instead.
func (*IsFavoriteReply) GetIsFavorite ¶
func (x *IsFavoriteReply) GetIsFavorite() []bool
func (*IsFavoriteReply) ProtoMessage ¶
func (*IsFavoriteReply) ProtoMessage()
func (*IsFavoriteReply) ProtoReflect ¶
func (x *IsFavoriteReply) ProtoReflect() protoreflect.Message
func (*IsFavoriteReply) Reset ¶
func (x *IsFavoriteReply) Reset()
func (*IsFavoriteReply) String ¶
func (x *IsFavoriteReply) String() string
func (*IsFavoriteReply) Validate ¶
func (m *IsFavoriteReply) Validate() error
Validate checks the field values on IsFavoriteReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*IsFavoriteReply) ValidateAll ¶
func (m *IsFavoriteReply) ValidateAll() error
ValidateAll checks the field values on IsFavoriteReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in IsFavoriteReplyMultiError, or nil if none found.
type IsFavoriteReplyMultiError ¶
type IsFavoriteReplyMultiError []error
IsFavoriteReplyMultiError is an error wrapping multiple validation errors returned by IsFavoriteReply.ValidateAll() if the designated constraints aren't met.
func (IsFavoriteReplyMultiError) AllErrors ¶
func (m IsFavoriteReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (IsFavoriteReplyMultiError) Error ¶
func (m IsFavoriteReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type IsFavoriteReplyValidationError ¶
type IsFavoriteReplyValidationError struct {
// contains filtered or unexported fields
}
IsFavoriteReplyValidationError is the validation error returned by IsFavoriteReply.Validate if the designated constraints aren't met.
func (IsFavoriteReplyValidationError) Cause ¶
func (e IsFavoriteReplyValidationError) Cause() error
Cause function returns cause value.
func (IsFavoriteReplyValidationError) Error ¶
func (e IsFavoriteReplyValidationError) Error() string
Error satisfies the builtin error interface
func (IsFavoriteReplyValidationError) ErrorName ¶
func (e IsFavoriteReplyValidationError) ErrorName() string
ErrorName returns error name.
func (IsFavoriteReplyValidationError) Field ¶
func (e IsFavoriteReplyValidationError) Field() string
Field function returns field value.
func (IsFavoriteReplyValidationError) Key ¶
func (e IsFavoriteReplyValidationError) Key() bool
Key function returns key value.
func (IsFavoriteReplyValidationError) Reason ¶
func (e IsFavoriteReplyValidationError) Reason() string
Reason function returns reason value.
type IsFavoriteRequest ¶
type IsFavoriteRequest struct { // 需要判断的用户 id UserId uint32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 需要判断的视频 id 列表 VideoIds []uint32 `protobuf:"varint,2,rep,packed,name=video_ids,json=videoIds,proto3" json:"video_ids,omitempty"` // contains filtered or unexported fields }
func (*IsFavoriteRequest) Descriptor
deprecated
func (*IsFavoriteRequest) Descriptor() ([]byte, []int)
Deprecated: Use IsFavoriteRequest.ProtoReflect.Descriptor instead.
func (*IsFavoriteRequest) GetUserId ¶
func (x *IsFavoriteRequest) GetUserId() uint32
func (*IsFavoriteRequest) GetVideoIds ¶
func (x *IsFavoriteRequest) GetVideoIds() []uint32
func (*IsFavoriteRequest) ProtoMessage ¶
func (*IsFavoriteRequest) ProtoMessage()
func (*IsFavoriteRequest) ProtoReflect ¶
func (x *IsFavoriteRequest) ProtoReflect() protoreflect.Message
func (*IsFavoriteRequest) Reset ¶
func (x *IsFavoriteRequest) Reset()
func (*IsFavoriteRequest) String ¶
func (x *IsFavoriteRequest) String() string
func (*IsFavoriteRequest) Validate ¶
func (m *IsFavoriteRequest) Validate() error
Validate checks the field values on IsFavoriteRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*IsFavoriteRequest) ValidateAll ¶
func (m *IsFavoriteRequest) ValidateAll() error
ValidateAll checks the field values on IsFavoriteRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in IsFavoriteRequestMultiError, or nil if none found.
type IsFavoriteRequestMultiError ¶
type IsFavoriteRequestMultiError []error
IsFavoriteRequestMultiError is an error wrapping multiple validation errors returned by IsFavoriteRequest.ValidateAll() if the designated constraints aren't met.
func (IsFavoriteRequestMultiError) AllErrors ¶
func (m IsFavoriteRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (IsFavoriteRequestMultiError) Error ¶
func (m IsFavoriteRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type IsFavoriteRequestValidationError ¶
type IsFavoriteRequestValidationError struct {
// contains filtered or unexported fields
}
IsFavoriteRequestValidationError is the validation error returned by IsFavoriteRequest.Validate if the designated constraints aren't met.
func (IsFavoriteRequestValidationError) Cause ¶
func (e IsFavoriteRequestValidationError) Cause() error
Cause function returns cause value.
func (IsFavoriteRequestValidationError) Error ¶
func (e IsFavoriteRequestValidationError) Error() string
Error satisfies the builtin error interface
func (IsFavoriteRequestValidationError) ErrorName ¶
func (e IsFavoriteRequestValidationError) ErrorName() string
ErrorName returns error name.
func (IsFavoriteRequestValidationError) Field ¶
func (e IsFavoriteRequestValidationError) Field() string
Field function returns field value.
func (IsFavoriteRequestValidationError) Key ¶
func (e IsFavoriteRequestValidationError) Key() bool
Key function returns key value.
func (IsFavoriteRequestValidationError) Reason ¶
func (e IsFavoriteRequestValidationError) Reason() string
Reason function returns reason value.
type UnimplementedFavoriteServiceServer ¶
type UnimplementedFavoriteServiceServer struct { }
UnimplementedFavoriteServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedFavoriteServiceServer) FavoriteAction ¶
func (UnimplementedFavoriteServiceServer) FavoriteAction(context.Context, *FavoriteActionRequest) (*FavoriteActionReply, error)
func (UnimplementedFavoriteServiceServer) GetFavoriteList ¶
func (UnimplementedFavoriteServiceServer) GetFavoriteList(context.Context, *FavoriteListRequest) (*FavoriteListReply, error)
func (UnimplementedFavoriteServiceServer) IsFavorite ¶
func (UnimplementedFavoriteServiceServer) IsFavorite(context.Context, *IsFavoriteRequest) (*IsFavoriteReply, error)
type UnsafeFavoriteServiceServer ¶
type UnsafeFavoriteServiceServer interface {
// contains filtered or unexported methods
}
UnsafeFavoriteServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FavoriteServiceServer will result in compilation errors.
type User ¶
type User struct { // 用户id Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 用户名称 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 关注总数 FollowCount uint32 `protobuf:"varint,3,opt,name=follow_count,proto3" json:"follow_count,omitempty"` // 粉丝总数 FollowerCount uint32 `protobuf:"varint,4,opt,name=follower_count,proto3" json:"follower_count,omitempty"` // true-已关注,false-未关注 IsFollow bool `protobuf:"varint,5,opt,name=is_follow,proto3" json:"is_follow,omitempty"` // 用户头像 Avatar string `protobuf:"bytes,6,opt,name=avatar,proto3" json:"avatar,omitempty"` // 用户个人页顶部大图 BackgroundImage string `protobuf:"bytes,7,opt,name=background_image,proto3" json:"background_image,omitempty"` // 个人简介 Signature string `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"` // 获赞数量 TotalFavorited uint32 `protobuf:"varint,9,opt,name=total_favorited,proto3" json:"total_favorited,omitempty"` // 作品数量 WorkCount uint32 `protobuf:"varint,10,opt,name=work_count,proto3" json:"work_count,omitempty"` // 点赞数量 FavoriteCount uint32 `protobuf:"varint,11,opt,name=favorite_count,proto3" json:"favorite_count,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetBackgroundImage ¶
func (*User) GetFavoriteCount ¶
func (*User) GetFollowCount ¶
func (*User) GetFollowerCount ¶
func (*User) GetIsFollow ¶
func (*User) GetSignature ¶
func (*User) GetTotalFavorited ¶
func (*User) GetWorkCount ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
func (*User) Validate ¶
Validate checks the field values on User with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*User) ValidateAll ¶
ValidateAll checks the field values on User with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserMultiError, or nil if none found.
type UserMultiError ¶
type UserMultiError []error
UserMultiError is an error wrapping multiple validation errors returned by User.ValidateAll() if the designated constraints aren't met.
func (UserMultiError) AllErrors ¶
func (m UserMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserMultiError) Error ¶
func (m UserMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserValidationError ¶
type UserValidationError struct {
// contains filtered or unexported fields
}
UserValidationError is the validation error returned by User.Validate if the designated constraints aren't met.
func (UserValidationError) Cause ¶
func (e UserValidationError) Cause() error
Cause function returns cause value.
func (UserValidationError) Error ¶
func (e UserValidationError) Error() string
Error satisfies the builtin error interface
func (UserValidationError) ErrorName ¶
func (e UserValidationError) ErrorName() string
ErrorName returns error name.
func (UserValidationError) Field ¶
func (e UserValidationError) Field() string
Field function returns field value.
func (UserValidationError) Key ¶
func (e UserValidationError) Key() bool
Key function returns key value.
func (UserValidationError) Reason ¶
func (e UserValidationError) Reason() string
Reason function returns reason value.
type Video ¶
type Video struct { // 视频唯一标识 Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 视频作者信息 Author *User `protobuf:"bytes,2,opt,name=author,proto3" json:"author,omitempty"` // 视频播放地址 PlayUrl string `protobuf:"bytes,3,opt,name=play_url,proto3" json:"play_url,omitempty"` // 视频封面地址 CoverUrl string `protobuf:"bytes,4,opt,name=cover_url,proto3" json:"cover_url,omitempty"` // 视频的点赞总数 FavoriteCount uint32 `protobuf:"varint,5,opt,name=favorite_count,proto3" json:"favorite_count,omitempty"` // 视频的评论总数 CommentCount uint32 `protobuf:"varint,6,opt,name=comment_count,proto3" json:"comment_count,omitempty"` // true-已点赞,false-未点赞 IsFavorite bool `protobuf:"varint,7,opt,name=is_favorite,proto3" json:"is_favorite,omitempty"` // 视频标题 Title string `protobuf:"bytes,8,opt,name=title,proto3" 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
func (*Video) Validate ¶
Validate checks the field values on Video with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Video) ValidateAll ¶
ValidateAll checks the field values on Video with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in VideoMultiError, or nil if none found.
type VideoMultiError ¶
type VideoMultiError []error
VideoMultiError is an error wrapping multiple validation errors returned by Video.ValidateAll() if the designated constraints aren't met.
func (VideoMultiError) AllErrors ¶
func (m VideoMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (VideoMultiError) Error ¶
func (m VideoMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type VideoValidationError ¶
type VideoValidationError struct {
// contains filtered or unexported fields
}
VideoValidationError is the validation error returned by Video.Validate if the designated constraints aren't met.
func (VideoValidationError) Cause ¶
func (e VideoValidationError) Cause() error
Cause function returns cause value.
func (VideoValidationError) Error ¶
func (e VideoValidationError) Error() string
Error satisfies the builtin error interface
func (VideoValidationError) ErrorName ¶
func (e VideoValidationError) ErrorName() string
ErrorName returns error name.
func (VideoValidationError) Field ¶
func (e VideoValidationError) Field() string
Field function returns field value.
func (VideoValidationError) Key ¶
func (e VideoValidationError) Key() bool
Key function returns key value.
func (VideoValidationError) Reason ¶
func (e VideoValidationError) Reason() string
Reason function returns reason value.