v1

package
v0.0.0-...-7d1b39b Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const OperationFavoriteServiceFavoriteAction = "/favorite.service.v1.FavoriteService/FavoriteAction"
View Source
const OperationFavoriteServiceGetFavoriteList = "/favorite.service.v1.FavoriteService/GetFavoriteList"

Variables

View Source
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)

View Source
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

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

Cause function returns cause value.

func (FavoriteActionReplyValidationError) Error

Error satisfies the builtin error interface

func (FavoriteActionReplyValidationError) ErrorName

ErrorName returns error name.

func (FavoriteActionReplyValidationError) Field

Field function returns field value.

func (FavoriteActionReplyValidationError) Key

Key function returns key value.

func (FavoriteActionReplyValidationError) Reason

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

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

Cause function returns cause value.

func (FavoriteActionRequestValidationError) Error

Error satisfies the builtin error interface

func (FavoriteActionRequestValidationError) ErrorName

ErrorName returns error name.

func (FavoriteActionRequestValidationError) Field

Field function returns field value.

func (FavoriteActionRequestValidationError) Key

Key function returns key value.

func (FavoriteActionRequestValidationError) Reason

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

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

Cause function returns cause value.

func (FavoriteListReplyValidationError) Error

Error satisfies the builtin error interface

func (FavoriteListReplyValidationError) ErrorName

ErrorName returns error name.

func (FavoriteListReplyValidationError) Field

Field function returns field value.

func (FavoriteListReplyValidationError) Key

Key function returns key value.

func (FavoriteListReplyValidationError) Reason

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

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

Cause function returns cause value.

func (FavoriteListRequestValidationError) Error

Error satisfies the builtin error interface

func (FavoriteListRequestValidationError) ErrorName

ErrorName returns error name.

func (FavoriteListRequestValidationError) Field

Field function returns field value.

func (FavoriteListRequestValidationError) Key

Key function returns key value.

func (FavoriteListRequestValidationError) Reason

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.

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 (*FavoriteServiceHTTPClientImpl) GetFavoriteList

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

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

Cause function returns cause value.

func (IsFavoriteReplyValidationError) Error

Error satisfies the builtin error interface

func (IsFavoriteReplyValidationError) ErrorName

func (e IsFavoriteReplyValidationError) ErrorName() string

ErrorName returns error name.

func (IsFavoriteReplyValidationError) Field

Field function returns field value.

func (IsFavoriteReplyValidationError) Key

Key function returns key value.

func (IsFavoriteReplyValidationError) Reason

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

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

Cause function returns cause value.

func (IsFavoriteRequestValidationError) Error

Error satisfies the builtin error interface

func (IsFavoriteRequestValidationError) ErrorName

ErrorName returns error name.

func (IsFavoriteRequestValidationError) Field

Field function returns field value.

func (IsFavoriteRequestValidationError) Key

Key function returns key value.

func (IsFavoriteRequestValidationError) Reason

Reason function returns reason value.

type UnimplementedFavoriteServiceServer

type UnimplementedFavoriteServiceServer struct {
}

UnimplementedFavoriteServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedFavoriteServiceServer) FavoriteAction

func (UnimplementedFavoriteServiceServer) GetFavoriteList

func (UnimplementedFavoriteServiceServer) IsFavorite

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAvatar

func (x *User) GetAvatar() string

func (*User) GetBackgroundImage

func (x *User) GetBackgroundImage() string

func (*User) GetFavoriteCount

func (x *User) GetFavoriteCount() uint32

func (*User) GetFollowCount

func (x *User) GetFollowCount() uint32

func (*User) GetFollowerCount

func (x *User) GetFollowerCount() uint32

func (*User) GetId

func (x *User) GetId() uint32

func (*User) GetIsFollow

func (x *User) GetIsFollow() bool

func (*User) GetName

func (x *User) GetName() string

func (*User) GetSignature

func (x *User) GetSignature() string

func (*User) GetTotalFavorited

func (x *User) GetTotalFavorited() uint32

func (*User) GetWorkCount

func (x *User) GetWorkCount() uint32

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

func (*User) Validate

func (m *User) Validate() error

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

func (m *User) ValidateAll() error

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

Deprecated: Use Video.ProtoReflect.Descriptor instead.

func (*Video) GetAuthor

func (x *Video) GetAuthor() *User

func (*Video) GetCommentCount

func (x *Video) GetCommentCount() uint32

func (*Video) GetCoverUrl

func (x *Video) GetCoverUrl() string

func (*Video) GetFavoriteCount

func (x *Video) GetFavoriteCount() uint32

func (*Video) GetId

func (x *Video) GetId() uint32

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

func (*Video) Validate

func (m *Video) Validate() error

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

func (m *Video) ValidateAll() error

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.

Jump to

Keyboard shortcuts

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