You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1235 lines
27 KiB
1235 lines
27 KiB
// Code generated by Fastpb v0.0.2. DO NOT EDIT.
|
|
|
|
package entity
|
|
|
|
import (
|
|
fmt "fmt"
|
|
fastpb "github.com/cloudwego/fastpb"
|
|
)
|
|
|
|
var (
|
|
_ = fmt.Errorf
|
|
_ = fastpb.Skip
|
|
)
|
|
|
|
func (x *BaseResponse) FastRead(buf []byte, _type int8, number int32) (offset int, err error) {
|
|
switch number {
|
|
case 1:
|
|
offset, err = x.fastReadField1(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 2:
|
|
offset, err = x.fastReadField2(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
default:
|
|
offset, err = fastpb.Skip(buf, _type, number)
|
|
if err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
return offset, nil
|
|
SkipFieldError:
|
|
return offset, fmt.Errorf("%T cannot parse invalid wire-format data, error: %s", x, err)
|
|
ReadFieldError:
|
|
return offset, fmt.Errorf("%T read field %d '%s' error: %s", x, number, fieldIDToName_BaseResponse[number], err)
|
|
}
|
|
|
|
func (x *BaseResponse) fastReadField1(buf []byte, _type int8) (offset int, err error) {
|
|
x.StatusCode, offset, err = fastpb.ReadInt32(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *BaseResponse) fastReadField2(buf []byte, _type int8) (offset int, err error) {
|
|
x.StatusMsg, offset, err = fastpb.ReadString(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *Comment) FastRead(buf []byte, _type int8, number int32) (offset int, err error) {
|
|
switch number {
|
|
case 1:
|
|
offset, err = x.fastReadField1(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 2:
|
|
offset, err = x.fastReadField2(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 3:
|
|
offset, err = x.fastReadField3(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 4:
|
|
offset, err = x.fastReadField4(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 5:
|
|
offset, err = x.fastReadField5(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 6:
|
|
offset, err = x.fastReadField6(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
default:
|
|
offset, err = fastpb.Skip(buf, _type, number)
|
|
if err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
return offset, nil
|
|
SkipFieldError:
|
|
return offset, fmt.Errorf("%T cannot parse invalid wire-format data, error: %s", x, err)
|
|
ReadFieldError:
|
|
return offset, fmt.Errorf("%T read field %d '%s' error: %s", x, number, fieldIDToName_Comment[number], err)
|
|
}
|
|
|
|
func (x *Comment) fastReadField1(buf []byte, _type int8) (offset int, err error) {
|
|
x.Id, offset, err = fastpb.ReadInt64(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *Comment) fastReadField2(buf []byte, _type int8) (offset int, err error) {
|
|
var v User
|
|
offset, err = fastpb.ReadMessage(buf, _type, &v)
|
|
if err != nil {
|
|
return offset, err
|
|
}
|
|
x.User = &v
|
|
return offset, nil
|
|
}
|
|
|
|
func (x *Comment) fastReadField3(buf []byte, _type int8) (offset int, err error) {
|
|
x.Content, offset, err = fastpb.ReadString(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *Comment) fastReadField4(buf []byte, _type int8) (offset int, err error) {
|
|
x.CreateDate, offset, err = fastpb.ReadString(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *Comment) fastReadField5(buf []byte, _type int8) (offset int, err error) {
|
|
x.LikeCount, offset, err = fastpb.ReadInt64(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *Comment) fastReadField6(buf []byte, _type int8) (offset int, err error) {
|
|
x.TeaseCount, offset, err = fastpb.ReadInt64(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *FriendUser) FastRead(buf []byte, _type int8, number int32) (offset int, err error) {
|
|
switch number {
|
|
case 1:
|
|
offset, err = x.fastReadField1(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 2:
|
|
offset, err = x.fastReadField2(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 3:
|
|
offset, err = x.fastReadField3(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
default:
|
|
offset, err = fastpb.Skip(buf, _type, number)
|
|
if err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
return offset, nil
|
|
SkipFieldError:
|
|
return offset, fmt.Errorf("%T cannot parse invalid wire-format data, error: %s", x, err)
|
|
ReadFieldError:
|
|
return offset, fmt.Errorf("%T read field %d '%s' error: %s", x, number, fieldIDToName_FriendUser[number], err)
|
|
}
|
|
|
|
func (x *FriendUser) fastReadField1(buf []byte, _type int8) (offset int, err error) {
|
|
var v User
|
|
offset, err = fastpb.ReadMessage(buf, _type, &v)
|
|
if err != nil {
|
|
return offset, err
|
|
}
|
|
x.User = &v
|
|
return offset, nil
|
|
}
|
|
|
|
func (x *FriendUser) fastReadField2(buf []byte, _type int8) (offset int, err error) {
|
|
x.Message, offset, err = fastpb.ReadString(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *FriendUser) fastReadField3(buf []byte, _type int8) (offset int, err error) {
|
|
x.MsgType, offset, err = fastpb.ReadInt64(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *Message) FastRead(buf []byte, _type int8, number int32) (offset int, err error) {
|
|
switch number {
|
|
case 1:
|
|
offset, err = x.fastReadField1(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 2:
|
|
offset, err = x.fastReadField2(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 3:
|
|
offset, err = x.fastReadField3(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 4:
|
|
offset, err = x.fastReadField4(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 5:
|
|
offset, err = x.fastReadField5(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
default:
|
|
offset, err = fastpb.Skip(buf, _type, number)
|
|
if err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
return offset, nil
|
|
SkipFieldError:
|
|
return offset, fmt.Errorf("%T cannot parse invalid wire-format data, error: %s", x, err)
|
|
ReadFieldError:
|
|
return offset, fmt.Errorf("%T read field %d '%s' error: %s", x, number, fieldIDToName_Message[number], err)
|
|
}
|
|
|
|
func (x *Message) fastReadField1(buf []byte, _type int8) (offset int, err error) {
|
|
x.Id, offset, err = fastpb.ReadInt64(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *Message) fastReadField2(buf []byte, _type int8) (offset int, err error) {
|
|
x.ToUserId, offset, err = fastpb.ReadInt64(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *Message) fastReadField3(buf []byte, _type int8) (offset int, err error) {
|
|
x.FromUserId, offset, err = fastpb.ReadInt64(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *Message) fastReadField4(buf []byte, _type int8) (offset int, err error) {
|
|
x.Content, offset, err = fastpb.ReadString(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *Message) fastReadField5(buf []byte, _type int8) (offset int, err error) {
|
|
x.CreateTime, offset, err = fastpb.ReadInt64(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *User) FastRead(buf []byte, _type int8, number int32) (offset int, err error) {
|
|
switch number {
|
|
case 1:
|
|
offset, err = x.fastReadField1(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 2:
|
|
offset, err = x.fastReadField2(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 3:
|
|
offset, err = x.fastReadField3(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 4:
|
|
offset, err = x.fastReadField4(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 5:
|
|
offset, err = x.fastReadField5(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 6:
|
|
offset, err = x.fastReadField6(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 7:
|
|
offset, err = x.fastReadField7(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 8:
|
|
offset, err = x.fastReadField8(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 9:
|
|
offset, err = x.fastReadField9(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 10:
|
|
offset, err = x.fastReadField10(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 11:
|
|
offset, err = x.fastReadField11(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
default:
|
|
offset, err = fastpb.Skip(buf, _type, number)
|
|
if err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
return offset, nil
|
|
SkipFieldError:
|
|
return offset, fmt.Errorf("%T cannot parse invalid wire-format data, error: %s", x, err)
|
|
ReadFieldError:
|
|
return offset, fmt.Errorf("%T read field %d '%s' error: %s", x, number, fieldIDToName_User[number], err)
|
|
}
|
|
|
|
func (x *User) fastReadField1(buf []byte, _type int8) (offset int, err error) {
|
|
x.Id, offset, err = fastpb.ReadInt64(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *User) fastReadField2(buf []byte, _type int8) (offset int, err error) {
|
|
x.Name, offset, err = fastpb.ReadString(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *User) fastReadField3(buf []byte, _type int8) (offset int, err error) {
|
|
x.FollowCount, offset, err = fastpb.ReadInt64(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *User) fastReadField4(buf []byte, _type int8) (offset int, err error) {
|
|
x.FollowerCount, offset, err = fastpb.ReadInt64(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *User) fastReadField5(buf []byte, _type int8) (offset int, err error) {
|
|
x.IsFollow, offset, err = fastpb.ReadBool(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *User) fastReadField6(buf []byte, _type int8) (offset int, err error) {
|
|
x.Avatar, offset, err = fastpb.ReadString(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *User) fastReadField7(buf []byte, _type int8) (offset int, err error) {
|
|
x.BackgroundImage, offset, err = fastpb.ReadString(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *User) fastReadField8(buf []byte, _type int8) (offset int, err error) {
|
|
x.Signature, offset, err = fastpb.ReadString(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *User) fastReadField9(buf []byte, _type int8) (offset int, err error) {
|
|
x.TotalFavorited, offset, err = fastpb.ReadInt64(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *User) fastReadField10(buf []byte, _type int8) (offset int, err error) {
|
|
x.WorkCount, offset, err = fastpb.ReadInt64(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *User) fastReadField11(buf []byte, _type int8) (offset int, err error) {
|
|
x.FavoriteCount, offset, err = fastpb.ReadInt64(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *Video) FastRead(buf []byte, _type int8, number int32) (offset int, err error) {
|
|
switch number {
|
|
case 1:
|
|
offset, err = x.fastReadField1(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 2:
|
|
offset, err = x.fastReadField2(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 3:
|
|
offset, err = x.fastReadField3(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 4:
|
|
offset, err = x.fastReadField4(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 5:
|
|
offset, err = x.fastReadField5(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 6:
|
|
offset, err = x.fastReadField6(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 7:
|
|
offset, err = x.fastReadField7(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
case 8:
|
|
offset, err = x.fastReadField8(buf, _type)
|
|
if err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
default:
|
|
offset, err = fastpb.Skip(buf, _type, number)
|
|
if err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
return offset, nil
|
|
SkipFieldError:
|
|
return offset, fmt.Errorf("%T cannot parse invalid wire-format data, error: %s", x, err)
|
|
ReadFieldError:
|
|
return offset, fmt.Errorf("%T read field %d '%s' error: %s", x, number, fieldIDToName_Video[number], err)
|
|
}
|
|
|
|
func (x *Video) fastReadField1(buf []byte, _type int8) (offset int, err error) {
|
|
x.Id, offset, err = fastpb.ReadInt64(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *Video) fastReadField2(buf []byte, _type int8) (offset int, err error) {
|
|
var v User
|
|
offset, err = fastpb.ReadMessage(buf, _type, &v)
|
|
if err != nil {
|
|
return offset, err
|
|
}
|
|
x.Author = &v
|
|
return offset, nil
|
|
}
|
|
|
|
func (x *Video) fastReadField3(buf []byte, _type int8) (offset int, err error) {
|
|
x.PlayUrl, offset, err = fastpb.ReadString(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *Video) fastReadField4(buf []byte, _type int8) (offset int, err error) {
|
|
x.CoverUrl, offset, err = fastpb.ReadString(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *Video) fastReadField5(buf []byte, _type int8) (offset int, err error) {
|
|
x.FavoriteCount, offset, err = fastpb.ReadInt64(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *Video) fastReadField6(buf []byte, _type int8) (offset int, err error) {
|
|
x.CommentCount, offset, err = fastpb.ReadInt64(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *Video) fastReadField7(buf []byte, _type int8) (offset int, err error) {
|
|
x.IsFavorite, offset, err = fastpb.ReadBool(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *Video) fastReadField8(buf []byte, _type int8) (offset int, err error) {
|
|
x.Title, offset, err = fastpb.ReadString(buf, _type)
|
|
return offset, err
|
|
}
|
|
|
|
func (x *BaseResponse) FastWrite(buf []byte) (offset int) {
|
|
if x == nil {
|
|
return offset
|
|
}
|
|
offset += x.fastWriteField1(buf[offset:])
|
|
offset += x.fastWriteField2(buf[offset:])
|
|
return offset
|
|
}
|
|
|
|
func (x *BaseResponse) fastWriteField1(buf []byte) (offset int) {
|
|
if x.StatusCode == 0 {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteInt32(buf[offset:], 1, x.StatusCode)
|
|
return offset
|
|
}
|
|
|
|
func (x *BaseResponse) fastWriteField2(buf []byte) (offset int) {
|
|
if x.StatusMsg == "" {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteString(buf[offset:], 2, x.StatusMsg)
|
|
return offset
|
|
}
|
|
|
|
func (x *Comment) FastWrite(buf []byte) (offset int) {
|
|
if x == nil {
|
|
return offset
|
|
}
|
|
offset += x.fastWriteField1(buf[offset:])
|
|
offset += x.fastWriteField2(buf[offset:])
|
|
offset += x.fastWriteField3(buf[offset:])
|
|
offset += x.fastWriteField4(buf[offset:])
|
|
offset += x.fastWriteField5(buf[offset:])
|
|
offset += x.fastWriteField6(buf[offset:])
|
|
return offset
|
|
}
|
|
|
|
func (x *Comment) fastWriteField1(buf []byte) (offset int) {
|
|
if x.Id == 0 {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteInt64(buf[offset:], 1, x.Id)
|
|
return offset
|
|
}
|
|
|
|
func (x *Comment) fastWriteField2(buf []byte) (offset int) {
|
|
if x.User == nil {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteMessage(buf[offset:], 2, x.User)
|
|
return offset
|
|
}
|
|
|
|
func (x *Comment) fastWriteField3(buf []byte) (offset int) {
|
|
if x.Content == "" {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteString(buf[offset:], 3, x.Content)
|
|
return offset
|
|
}
|
|
|
|
func (x *Comment) fastWriteField4(buf []byte) (offset int) {
|
|
if x.CreateDate == "" {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteString(buf[offset:], 4, x.CreateDate)
|
|
return offset
|
|
}
|
|
|
|
func (x *Comment) fastWriteField5(buf []byte) (offset int) {
|
|
if x.LikeCount == 0 {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteInt64(buf[offset:], 5, x.LikeCount)
|
|
return offset
|
|
}
|
|
|
|
func (x *Comment) fastWriteField6(buf []byte) (offset int) {
|
|
if x.TeaseCount == 0 {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteInt64(buf[offset:], 6, x.TeaseCount)
|
|
return offset
|
|
}
|
|
|
|
func (x *FriendUser) FastWrite(buf []byte) (offset int) {
|
|
if x == nil {
|
|
return offset
|
|
}
|
|
offset += x.fastWriteField1(buf[offset:])
|
|
offset += x.fastWriteField2(buf[offset:])
|
|
offset += x.fastWriteField3(buf[offset:])
|
|
return offset
|
|
}
|
|
|
|
func (x *FriendUser) fastWriteField1(buf []byte) (offset int) {
|
|
if x.User == nil {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteMessage(buf[offset:], 1, x.User)
|
|
return offset
|
|
}
|
|
|
|
func (x *FriendUser) fastWriteField2(buf []byte) (offset int) {
|
|
if x.Message == "" {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteString(buf[offset:], 2, x.Message)
|
|
return offset
|
|
}
|
|
|
|
func (x *FriendUser) fastWriteField3(buf []byte) (offset int) {
|
|
if x.MsgType == 0 {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteInt64(buf[offset:], 3, x.MsgType)
|
|
return offset
|
|
}
|
|
|
|
func (x *Message) FastWrite(buf []byte) (offset int) {
|
|
if x == nil {
|
|
return offset
|
|
}
|
|
offset += x.fastWriteField1(buf[offset:])
|
|
offset += x.fastWriteField2(buf[offset:])
|
|
offset += x.fastWriteField3(buf[offset:])
|
|
offset += x.fastWriteField4(buf[offset:])
|
|
offset += x.fastWriteField5(buf[offset:])
|
|
return offset
|
|
}
|
|
|
|
func (x *Message) fastWriteField1(buf []byte) (offset int) {
|
|
if x.Id == 0 {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteInt64(buf[offset:], 1, x.Id)
|
|
return offset
|
|
}
|
|
|
|
func (x *Message) fastWriteField2(buf []byte) (offset int) {
|
|
if x.ToUserId == 0 {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteInt64(buf[offset:], 2, x.ToUserId)
|
|
return offset
|
|
}
|
|
|
|
func (x *Message) fastWriteField3(buf []byte) (offset int) {
|
|
if x.FromUserId == 0 {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteInt64(buf[offset:], 3, x.FromUserId)
|
|
return offset
|
|
}
|
|
|
|
func (x *Message) fastWriteField4(buf []byte) (offset int) {
|
|
if x.Content == "" {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteString(buf[offset:], 4, x.Content)
|
|
return offset
|
|
}
|
|
|
|
func (x *Message) fastWriteField5(buf []byte) (offset int) {
|
|
if x.CreateTime == 0 {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteInt64(buf[offset:], 5, x.CreateTime)
|
|
return offset
|
|
}
|
|
|
|
func (x *User) FastWrite(buf []byte) (offset int) {
|
|
if x == nil {
|
|
return offset
|
|
}
|
|
offset += x.fastWriteField1(buf[offset:])
|
|
offset += x.fastWriteField2(buf[offset:])
|
|
offset += x.fastWriteField3(buf[offset:])
|
|
offset += x.fastWriteField4(buf[offset:])
|
|
offset += x.fastWriteField5(buf[offset:])
|
|
offset += x.fastWriteField6(buf[offset:])
|
|
offset += x.fastWriteField7(buf[offset:])
|
|
offset += x.fastWriteField8(buf[offset:])
|
|
offset += x.fastWriteField9(buf[offset:])
|
|
offset += x.fastWriteField10(buf[offset:])
|
|
offset += x.fastWriteField11(buf[offset:])
|
|
return offset
|
|
}
|
|
|
|
func (x *User) fastWriteField1(buf []byte) (offset int) {
|
|
if x.Id == 0 {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteInt64(buf[offset:], 1, x.Id)
|
|
return offset
|
|
}
|
|
|
|
func (x *User) fastWriteField2(buf []byte) (offset int) {
|
|
if x.Name == "" {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteString(buf[offset:], 2, x.Name)
|
|
return offset
|
|
}
|
|
|
|
func (x *User) fastWriteField3(buf []byte) (offset int) {
|
|
if x.FollowCount == 0 {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteInt64(buf[offset:], 3, x.FollowCount)
|
|
return offset
|
|
}
|
|
|
|
func (x *User) fastWriteField4(buf []byte) (offset int) {
|
|
if x.FollowerCount == 0 {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteInt64(buf[offset:], 4, x.FollowerCount)
|
|
return offset
|
|
}
|
|
|
|
func (x *User) fastWriteField5(buf []byte) (offset int) {
|
|
if !x.IsFollow {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteBool(buf[offset:], 5, x.IsFollow)
|
|
return offset
|
|
}
|
|
|
|
func (x *User) fastWriteField6(buf []byte) (offset int) {
|
|
if x.Avatar == "" {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteString(buf[offset:], 6, x.Avatar)
|
|
return offset
|
|
}
|
|
|
|
func (x *User) fastWriteField7(buf []byte) (offset int) {
|
|
if x.BackgroundImage == "" {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteString(buf[offset:], 7, x.BackgroundImage)
|
|
return offset
|
|
}
|
|
|
|
func (x *User) fastWriteField8(buf []byte) (offset int) {
|
|
if x.Signature == "" {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteString(buf[offset:], 8, x.Signature)
|
|
return offset
|
|
}
|
|
|
|
func (x *User) fastWriteField9(buf []byte) (offset int) {
|
|
if x.TotalFavorited == 0 {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteInt64(buf[offset:], 9, x.TotalFavorited)
|
|
return offset
|
|
}
|
|
|
|
func (x *User) fastWriteField10(buf []byte) (offset int) {
|
|
if x.WorkCount == 0 {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteInt64(buf[offset:], 10, x.WorkCount)
|
|
return offset
|
|
}
|
|
|
|
func (x *User) fastWriteField11(buf []byte) (offset int) {
|
|
if x.FavoriteCount == 0 {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteInt64(buf[offset:], 11, x.FavoriteCount)
|
|
return offset
|
|
}
|
|
|
|
func (x *Video) FastWrite(buf []byte) (offset int) {
|
|
if x == nil {
|
|
return offset
|
|
}
|
|
offset += x.fastWriteField1(buf[offset:])
|
|
offset += x.fastWriteField2(buf[offset:])
|
|
offset += x.fastWriteField3(buf[offset:])
|
|
offset += x.fastWriteField4(buf[offset:])
|
|
offset += x.fastWriteField5(buf[offset:])
|
|
offset += x.fastWriteField6(buf[offset:])
|
|
offset += x.fastWriteField7(buf[offset:])
|
|
offset += x.fastWriteField8(buf[offset:])
|
|
return offset
|
|
}
|
|
|
|
func (x *Video) fastWriteField1(buf []byte) (offset int) {
|
|
if x.Id == 0 {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteInt64(buf[offset:], 1, x.Id)
|
|
return offset
|
|
}
|
|
|
|
func (x *Video) fastWriteField2(buf []byte) (offset int) {
|
|
if x.Author == nil {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteMessage(buf[offset:], 2, x.Author)
|
|
return offset
|
|
}
|
|
|
|
func (x *Video) fastWriteField3(buf []byte) (offset int) {
|
|
if x.PlayUrl == "" {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteString(buf[offset:], 3, x.PlayUrl)
|
|
return offset
|
|
}
|
|
|
|
func (x *Video) fastWriteField4(buf []byte) (offset int) {
|
|
if x.CoverUrl == "" {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteString(buf[offset:], 4, x.CoverUrl)
|
|
return offset
|
|
}
|
|
|
|
func (x *Video) fastWriteField5(buf []byte) (offset int) {
|
|
if x.FavoriteCount == 0 {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteInt64(buf[offset:], 5, x.FavoriteCount)
|
|
return offset
|
|
}
|
|
|
|
func (x *Video) fastWriteField6(buf []byte) (offset int) {
|
|
if x.CommentCount == 0 {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteInt64(buf[offset:], 6, x.CommentCount)
|
|
return offset
|
|
}
|
|
|
|
func (x *Video) fastWriteField7(buf []byte) (offset int) {
|
|
if !x.IsFavorite {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteBool(buf[offset:], 7, x.IsFavorite)
|
|
return offset
|
|
}
|
|
|
|
func (x *Video) fastWriteField8(buf []byte) (offset int) {
|
|
if x.Title == "" {
|
|
return offset
|
|
}
|
|
offset += fastpb.WriteString(buf[offset:], 8, x.Title)
|
|
return offset
|
|
}
|
|
|
|
func (x *BaseResponse) Size() (n int) {
|
|
if x == nil {
|
|
return n
|
|
}
|
|
n += x.sizeField1()
|
|
n += x.sizeField2()
|
|
return n
|
|
}
|
|
|
|
func (x *BaseResponse) sizeField1() (n int) {
|
|
if x.StatusCode == 0 {
|
|
return n
|
|
}
|
|
n += fastpb.SizeInt32(1, x.StatusCode)
|
|
return n
|
|
}
|
|
|
|
func (x *BaseResponse) sizeField2() (n int) {
|
|
if x.StatusMsg == "" {
|
|
return n
|
|
}
|
|
n += fastpb.SizeString(2, x.StatusMsg)
|
|
return n
|
|
}
|
|
|
|
func (x *Comment) Size() (n int) {
|
|
if x == nil {
|
|
return n
|
|
}
|
|
n += x.sizeField1()
|
|
n += x.sizeField2()
|
|
n += x.sizeField3()
|
|
n += x.sizeField4()
|
|
n += x.sizeField5()
|
|
n += x.sizeField6()
|
|
return n
|
|
}
|
|
|
|
func (x *Comment) sizeField1() (n int) {
|
|
if x.Id == 0 {
|
|
return n
|
|
}
|
|
n += fastpb.SizeInt64(1, x.Id)
|
|
return n
|
|
}
|
|
|
|
func (x *Comment) sizeField2() (n int) {
|
|
if x.User == nil {
|
|
return n
|
|
}
|
|
n += fastpb.SizeMessage(2, x.User)
|
|
return n
|
|
}
|
|
|
|
func (x *Comment) sizeField3() (n int) {
|
|
if x.Content == "" {
|
|
return n
|
|
}
|
|
n += fastpb.SizeString(3, x.Content)
|
|
return n
|
|
}
|
|
|
|
func (x *Comment) sizeField4() (n int) {
|
|
if x.CreateDate == "" {
|
|
return n
|
|
}
|
|
n += fastpb.SizeString(4, x.CreateDate)
|
|
return n
|
|
}
|
|
|
|
func (x *Comment) sizeField5() (n int) {
|
|
if x.LikeCount == 0 {
|
|
return n
|
|
}
|
|
n += fastpb.SizeInt64(5, x.LikeCount)
|
|
return n
|
|
}
|
|
|
|
func (x *Comment) sizeField6() (n int) {
|
|
if x.TeaseCount == 0 {
|
|
return n
|
|
}
|
|
n += fastpb.SizeInt64(6, x.TeaseCount)
|
|
return n
|
|
}
|
|
|
|
func (x *FriendUser) Size() (n int) {
|
|
if x == nil {
|
|
return n
|
|
}
|
|
n += x.sizeField1()
|
|
n += x.sizeField2()
|
|
n += x.sizeField3()
|
|
return n
|
|
}
|
|
|
|
func (x *FriendUser) sizeField1() (n int) {
|
|
if x.User == nil {
|
|
return n
|
|
}
|
|
n += fastpb.SizeMessage(1, x.User)
|
|
return n
|
|
}
|
|
|
|
func (x *FriendUser) sizeField2() (n int) {
|
|
if x.Message == "" {
|
|
return n
|
|
}
|
|
n += fastpb.SizeString(2, x.Message)
|
|
return n
|
|
}
|
|
|
|
func (x *FriendUser) sizeField3() (n int) {
|
|
if x.MsgType == 0 {
|
|
return n
|
|
}
|
|
n += fastpb.SizeInt64(3, x.MsgType)
|
|
return n
|
|
}
|
|
|
|
func (x *Message) Size() (n int) {
|
|
if x == nil {
|
|
return n
|
|
}
|
|
n += x.sizeField1()
|
|
n += x.sizeField2()
|
|
n += x.sizeField3()
|
|
n += x.sizeField4()
|
|
n += x.sizeField5()
|
|
return n
|
|
}
|
|
|
|
func (x *Message) sizeField1() (n int) {
|
|
if x.Id == 0 {
|
|
return n
|
|
}
|
|
n += fastpb.SizeInt64(1, x.Id)
|
|
return n
|
|
}
|
|
|
|
func (x *Message) sizeField2() (n int) {
|
|
if x.ToUserId == 0 {
|
|
return n
|
|
}
|
|
n += fastpb.SizeInt64(2, x.ToUserId)
|
|
return n
|
|
}
|
|
|
|
func (x *Message) sizeField3() (n int) {
|
|
if x.FromUserId == 0 {
|
|
return n
|
|
}
|
|
n += fastpb.SizeInt64(3, x.FromUserId)
|
|
return n
|
|
}
|
|
|
|
func (x *Message) sizeField4() (n int) {
|
|
if x.Content == "" {
|
|
return n
|
|
}
|
|
n += fastpb.SizeString(4, x.Content)
|
|
return n
|
|
}
|
|
|
|
func (x *Message) sizeField5() (n int) {
|
|
if x.CreateTime == 0 {
|
|
return n
|
|
}
|
|
n += fastpb.SizeInt64(5, x.CreateTime)
|
|
return n
|
|
}
|
|
|
|
func (x *User) Size() (n int) {
|
|
if x == nil {
|
|
return n
|
|
}
|
|
n += x.sizeField1()
|
|
n += x.sizeField2()
|
|
n += x.sizeField3()
|
|
n += x.sizeField4()
|
|
n += x.sizeField5()
|
|
n += x.sizeField6()
|
|
n += x.sizeField7()
|
|
n += x.sizeField8()
|
|
n += x.sizeField9()
|
|
n += x.sizeField10()
|
|
n += x.sizeField11()
|
|
return n
|
|
}
|
|
|
|
func (x *User) sizeField1() (n int) {
|
|
if x.Id == 0 {
|
|
return n
|
|
}
|
|
n += fastpb.SizeInt64(1, x.Id)
|
|
return n
|
|
}
|
|
|
|
func (x *User) sizeField2() (n int) {
|
|
if x.Name == "" {
|
|
return n
|
|
}
|
|
n += fastpb.SizeString(2, x.Name)
|
|
return n
|
|
}
|
|
|
|
func (x *User) sizeField3() (n int) {
|
|
if x.FollowCount == 0 {
|
|
return n
|
|
}
|
|
n += fastpb.SizeInt64(3, x.FollowCount)
|
|
return n
|
|
}
|
|
|
|
func (x *User) sizeField4() (n int) {
|
|
if x.FollowerCount == 0 {
|
|
return n
|
|
}
|
|
n += fastpb.SizeInt64(4, x.FollowerCount)
|
|
return n
|
|
}
|
|
|
|
func (x *User) sizeField5() (n int) {
|
|
if !x.IsFollow {
|
|
return n
|
|
}
|
|
n += fastpb.SizeBool(5, x.IsFollow)
|
|
return n
|
|
}
|
|
|
|
func (x *User) sizeField6() (n int) {
|
|
if x.Avatar == "" {
|
|
return n
|
|
}
|
|
n += fastpb.SizeString(6, x.Avatar)
|
|
return n
|
|
}
|
|
|
|
func (x *User) sizeField7() (n int) {
|
|
if x.BackgroundImage == "" {
|
|
return n
|
|
}
|
|
n += fastpb.SizeString(7, x.BackgroundImage)
|
|
return n
|
|
}
|
|
|
|
func (x *User) sizeField8() (n int) {
|
|
if x.Signature == "" {
|
|
return n
|
|
}
|
|
n += fastpb.SizeString(8, x.Signature)
|
|
return n
|
|
}
|
|
|
|
func (x *User) sizeField9() (n int) {
|
|
if x.TotalFavorited == 0 {
|
|
return n
|
|
}
|
|
n += fastpb.SizeInt64(9, x.TotalFavorited)
|
|
return n
|
|
}
|
|
|
|
func (x *User) sizeField10() (n int) {
|
|
if x.WorkCount == 0 {
|
|
return n
|
|
}
|
|
n += fastpb.SizeInt64(10, x.WorkCount)
|
|
return n
|
|
}
|
|
|
|
func (x *User) sizeField11() (n int) {
|
|
if x.FavoriteCount == 0 {
|
|
return n
|
|
}
|
|
n += fastpb.SizeInt64(11, x.FavoriteCount)
|
|
return n
|
|
}
|
|
|
|
func (x *Video) Size() (n int) {
|
|
if x == nil {
|
|
return n
|
|
}
|
|
n += x.sizeField1()
|
|
n += x.sizeField2()
|
|
n += x.sizeField3()
|
|
n += x.sizeField4()
|
|
n += x.sizeField5()
|
|
n += x.sizeField6()
|
|
n += x.sizeField7()
|
|
n += x.sizeField8()
|
|
return n
|
|
}
|
|
|
|
func (x *Video) sizeField1() (n int) {
|
|
if x.Id == 0 {
|
|
return n
|
|
}
|
|
n += fastpb.SizeInt64(1, x.Id)
|
|
return n
|
|
}
|
|
|
|
func (x *Video) sizeField2() (n int) {
|
|
if x.Author == nil {
|
|
return n
|
|
}
|
|
n += fastpb.SizeMessage(2, x.Author)
|
|
return n
|
|
}
|
|
|
|
func (x *Video) sizeField3() (n int) {
|
|
if x.PlayUrl == "" {
|
|
return n
|
|
}
|
|
n += fastpb.SizeString(3, x.PlayUrl)
|
|
return n
|
|
}
|
|
|
|
func (x *Video) sizeField4() (n int) {
|
|
if x.CoverUrl == "" {
|
|
return n
|
|
}
|
|
n += fastpb.SizeString(4, x.CoverUrl)
|
|
return n
|
|
}
|
|
|
|
func (x *Video) sizeField5() (n int) {
|
|
if x.FavoriteCount == 0 {
|
|
return n
|
|
}
|
|
n += fastpb.SizeInt64(5, x.FavoriteCount)
|
|
return n
|
|
}
|
|
|
|
func (x *Video) sizeField6() (n int) {
|
|
if x.CommentCount == 0 {
|
|
return n
|
|
}
|
|
n += fastpb.SizeInt64(6, x.CommentCount)
|
|
return n
|
|
}
|
|
|
|
func (x *Video) sizeField7() (n int) {
|
|
if !x.IsFavorite {
|
|
return n
|
|
}
|
|
n += fastpb.SizeBool(7, x.IsFavorite)
|
|
return n
|
|
}
|
|
|
|
func (x *Video) sizeField8() (n int) {
|
|
if x.Title == "" {
|
|
return n
|
|
}
|
|
n += fastpb.SizeString(8, x.Title)
|
|
return n
|
|
}
|
|
|
|
var fieldIDToName_BaseResponse = map[int32]string{
|
|
1: "StatusCode",
|
|
2: "StatusMsg",
|
|
}
|
|
|
|
var fieldIDToName_Comment = map[int32]string{
|
|
1: "Id",
|
|
2: "User",
|
|
3: "Content",
|
|
4: "CreateDate",
|
|
5: "LikeCount",
|
|
6: "TeaseCount",
|
|
}
|
|
|
|
var fieldIDToName_FriendUser = map[int32]string{
|
|
1: "User",
|
|
2: "Message",
|
|
3: "MsgType",
|
|
}
|
|
|
|
var fieldIDToName_Message = map[int32]string{
|
|
1: "Id",
|
|
2: "ToUserId",
|
|
3: "FromUserId",
|
|
4: "Content",
|
|
5: "CreateTime",
|
|
}
|
|
|
|
var fieldIDToName_User = map[int32]string{
|
|
1: "Id",
|
|
2: "Name",
|
|
3: "FollowCount",
|
|
4: "FollowerCount",
|
|
5: "IsFollow",
|
|
6: "Avatar",
|
|
7: "BackgroundImage",
|
|
8: "Signature",
|
|
9: "TotalFavorited",
|
|
10: "WorkCount",
|
|
11: "FavoriteCount",
|
|
}
|
|
|
|
var fieldIDToName_Video = map[int32]string{
|
|
1: "Id",
|
|
2: "Author",
|
|
3: "PlayUrl",
|
|
4: "CoverUrl",
|
|
5: "FavoriteCount",
|
|
6: "CommentCount",
|
|
7: "IsFavorite",
|
|
8: "Title",
|
|
}
|
|
|