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.
 
 
 
 
 
 

1175 lines
27 KiB

// Code generated by Fastpb v0.0.2. DO NOT EDIT.
package user
import (
fmt "fmt"
fastpb "github.com/cloudwego/fastpb"
)
var (
_ = fmt.Errorf
_ = fastpb.Skip
)
func (x *DouyinUserRegisterRequest) 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_DouyinUserRegisterRequest[number], err)
}
func (x *DouyinUserRegisterRequest) fastReadField1(buf []byte, _type int8) (offset int, err error) {
x.Username, offset, err = fastpb.ReadString(buf, _type)
return offset, err
}
func (x *DouyinUserRegisterRequest) fastReadField2(buf []byte, _type int8) (offset int, err error) {
x.Password, offset, err = fastpb.ReadString(buf, _type)
return offset, err
}
func (x *DouyinUserRegisterResponse) 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_DouyinUserRegisterResponse[number], err)
}
func (x *DouyinUserRegisterResponse) fastReadField1(buf []byte, _type int8) (offset int, err error) {
x.StatusCode, offset, err = fastpb.ReadInt32(buf, _type)
return offset, err
}
func (x *DouyinUserRegisterResponse) fastReadField2(buf []byte, _type int8) (offset int, err error) {
x.StatusMsg, offset, err = fastpb.ReadString(buf, _type)
return offset, err
}
func (x *DouyinUserRegisterResponse) fastReadField3(buf []byte, _type int8) (offset int, err error) {
x.UserId, offset, err = fastpb.ReadInt64(buf, _type)
return offset, err
}
func (x *DouyinUserLoginRequest) 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_DouyinUserLoginRequest[number], err)
}
func (x *DouyinUserLoginRequest) fastReadField1(buf []byte, _type int8) (offset int, err error) {
x.Username, offset, err = fastpb.ReadString(buf, _type)
return offset, err
}
func (x *DouyinUserLoginRequest) fastReadField2(buf []byte, _type int8) (offset int, err error) {
x.Password, offset, err = fastpb.ReadString(buf, _type)
return offset, err
}
func (x *DouyinUserLoginResponse) 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_DouyinUserLoginResponse[number], err)
}
func (x *DouyinUserLoginResponse) fastReadField1(buf []byte, _type int8) (offset int, err error) {
x.StatusCode, offset, err = fastpb.ReadInt32(buf, _type)
return offset, err
}
func (x *DouyinUserLoginResponse) fastReadField2(buf []byte, _type int8) (offset int, err error) {
x.StatusMsg, offset, err = fastpb.ReadString(buf, _type)
return offset, err
}
func (x *DouyinUserLoginResponse) fastReadField3(buf []byte, _type int8) (offset int, err error) {
x.UserId, offset, err = fastpb.ReadInt64(buf, _type)
return offset, err
}
func (x *DouyinUserRequest) 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
}
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_DouyinUserRequest[number], err)
}
func (x *DouyinUserRequest) fastReadField1(buf []byte, _type int8) (offset int, err error) {
x.UserId, offset, err = fastpb.ReadInt64(buf, _type)
return offset, err
}
func (x *DouyinUserResponse) 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_DouyinUserResponse[number], err)
}
func (x *DouyinUserResponse) fastReadField1(buf []byte, _type int8) (offset int, err error) {
x.StatusCode, offset, err = fastpb.ReadInt32(buf, _type)
return offset, err
}
func (x *DouyinUserResponse) fastReadField2(buf []byte, _type int8) (offset int, err error) {
x.StatusMsg, offset, err = fastpb.ReadString(buf, _type)
return offset, err
}
func (x *DouyinUserResponse) fastReadField3(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 *DouyinUserListRequest) 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
}
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_DouyinUserListRequest[number], err)
}
func (x *DouyinUserListRequest) fastReadField1(buf []byte, _type int8) (offset int, err error) {
offset, err = fastpb.ReadList(buf, _type,
func(buf []byte, _type int8) (n int, err error) {
var v int64
v, offset, err = fastpb.ReadInt64(buf, _type)
if err != nil {
return offset, err
}
x.UserList = append(x.UserList, v)
return offset, err
})
return offset, err
}
func (x *DouyinUserListResponse) 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_DouyinUserListResponse[number], err)
}
func (x *DouyinUserListResponse) fastReadField1(buf []byte, _type int8) (offset int, err error) {
x.StatusCode, offset, err = fastpb.ReadInt32(buf, _type)
return offset, err
}
func (x *DouyinUserListResponse) fastReadField2(buf []byte, _type int8) (offset int, err error) {
x.StatusMsg, offset, err = fastpb.ReadString(buf, _type)
return offset, err
}
func (x *DouyinUserListResponse) fastReadField3(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.UserList = append(x.UserList, &v)
return offset, nil
}
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 *DouyinUserRegisterRequest) FastWrite(buf []byte) (offset int) {
if x == nil {
return offset
}
offset += x.fastWriteField1(buf[offset:])
offset += x.fastWriteField2(buf[offset:])
return offset
}
func (x *DouyinUserRegisterRequest) fastWriteField1(buf []byte) (offset int) {
if x.Username == "" {
return offset
}
offset += fastpb.WriteString(buf[offset:], 1, x.Username)
return offset
}
func (x *DouyinUserRegisterRequest) fastWriteField2(buf []byte) (offset int) {
if x.Password == "" {
return offset
}
offset += fastpb.WriteString(buf[offset:], 2, x.Password)
return offset
}
func (x *DouyinUserRegisterResponse) 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 *DouyinUserRegisterResponse) fastWriteField1(buf []byte) (offset int) {
if x.StatusCode == 0 {
return offset
}
offset += fastpb.WriteInt32(buf[offset:], 1, x.StatusCode)
return offset
}
func (x *DouyinUserRegisterResponse) fastWriteField2(buf []byte) (offset int) {
if x.StatusMsg == "" {
return offset
}
offset += fastpb.WriteString(buf[offset:], 2, x.StatusMsg)
return offset
}
func (x *DouyinUserRegisterResponse) fastWriteField3(buf []byte) (offset int) {
if x.UserId == 0 {
return offset
}
offset += fastpb.WriteInt64(buf[offset:], 3, x.UserId)
return offset
}
func (x *DouyinUserLoginRequest) FastWrite(buf []byte) (offset int) {
if x == nil {
return offset
}
offset += x.fastWriteField1(buf[offset:])
offset += x.fastWriteField2(buf[offset:])
return offset
}
func (x *DouyinUserLoginRequest) fastWriteField1(buf []byte) (offset int) {
if x.Username == "" {
return offset
}
offset += fastpb.WriteString(buf[offset:], 1, x.Username)
return offset
}
func (x *DouyinUserLoginRequest) fastWriteField2(buf []byte) (offset int) {
if x.Password == "" {
return offset
}
offset += fastpb.WriteString(buf[offset:], 2, x.Password)
return offset
}
func (x *DouyinUserLoginResponse) 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 *DouyinUserLoginResponse) fastWriteField1(buf []byte) (offset int) {
if x.StatusCode == 0 {
return offset
}
offset += fastpb.WriteInt32(buf[offset:], 1, x.StatusCode)
return offset
}
func (x *DouyinUserLoginResponse) fastWriteField2(buf []byte) (offset int) {
if x.StatusMsg == "" {
return offset
}
offset += fastpb.WriteString(buf[offset:], 2, x.StatusMsg)
return offset
}
func (x *DouyinUserLoginResponse) fastWriteField3(buf []byte) (offset int) {
if x.UserId == 0 {
return offset
}
offset += fastpb.WriteInt64(buf[offset:], 3, x.UserId)
return offset
}
func (x *DouyinUserRequest) FastWrite(buf []byte) (offset int) {
if x == nil {
return offset
}
offset += x.fastWriteField1(buf[offset:])
return offset
}
func (x *DouyinUserRequest) fastWriteField1(buf []byte) (offset int) {
if x.UserId == 0 {
return offset
}
offset += fastpb.WriteInt64(buf[offset:], 1, x.UserId)
return offset
}
func (x *DouyinUserResponse) 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 *DouyinUserResponse) fastWriteField1(buf []byte) (offset int) {
if x.StatusCode == 0 {
return offset
}
offset += fastpb.WriteInt32(buf[offset:], 1, x.StatusCode)
return offset
}
func (x *DouyinUserResponse) fastWriteField2(buf []byte) (offset int) {
if x.StatusMsg == "" {
return offset
}
offset += fastpb.WriteString(buf[offset:], 2, x.StatusMsg)
return offset
}
func (x *DouyinUserResponse) fastWriteField3(buf []byte) (offset int) {
if x.User == nil {
return offset
}
offset += fastpb.WriteMessage(buf[offset:], 3, x.User)
return offset
}
func (x *DouyinUserListRequest) FastWrite(buf []byte) (offset int) {
if x == nil {
return offset
}
offset += x.fastWriteField1(buf[offset:])
return offset
}
func (x *DouyinUserListRequest) fastWriteField1(buf []byte) (offset int) {
if len(x.UserList) == 0 {
return offset
}
offset += fastpb.WriteListPacked(buf[offset:], 1, len(x.UserList),
func(buf []byte, numTagOrKey, numIdxOrVal int32) int {
offset := 0
offset += fastpb.WriteInt64(buf[offset:], numTagOrKey, x.UserList[numIdxOrVal])
return offset
})
return offset
}
func (x *DouyinUserListResponse) 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 *DouyinUserListResponse) fastWriteField1(buf []byte) (offset int) {
if x.StatusCode == 0 {
return offset
}
offset += fastpb.WriteInt32(buf[offset:], 1, x.StatusCode)
return offset
}
func (x *DouyinUserListResponse) fastWriteField2(buf []byte) (offset int) {
if x.StatusMsg == "" {
return offset
}
offset += fastpb.WriteString(buf[offset:], 2, x.StatusMsg)
return offset
}
func (x *DouyinUserListResponse) fastWriteField3(buf []byte) (offset int) {
if x.UserList == nil {
return offset
}
for i := range x.UserList {
offset += fastpb.WriteMessage(buf[offset:], 3, x.UserList[i])
}
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 *DouyinUserRegisterRequest) Size() (n int) {
if x == nil {
return n
}
n += x.sizeField1()
n += x.sizeField2()
return n
}
func (x *DouyinUserRegisterRequest) sizeField1() (n int) {
if x.Username == "" {
return n
}
n += fastpb.SizeString(1, x.Username)
return n
}
func (x *DouyinUserRegisterRequest) sizeField2() (n int) {
if x.Password == "" {
return n
}
n += fastpb.SizeString(2, x.Password)
return n
}
func (x *DouyinUserRegisterResponse) Size() (n int) {
if x == nil {
return n
}
n += x.sizeField1()
n += x.sizeField2()
n += x.sizeField3()
return n
}
func (x *DouyinUserRegisterResponse) sizeField1() (n int) {
if x.StatusCode == 0 {
return n
}
n += fastpb.SizeInt32(1, x.StatusCode)
return n
}
func (x *DouyinUserRegisterResponse) sizeField2() (n int) {
if x.StatusMsg == "" {
return n
}
n += fastpb.SizeString(2, x.StatusMsg)
return n
}
func (x *DouyinUserRegisterResponse) sizeField3() (n int) {
if x.UserId == 0 {
return n
}
n += fastpb.SizeInt64(3, x.UserId)
return n
}
func (x *DouyinUserLoginRequest) Size() (n int) {
if x == nil {
return n
}
n += x.sizeField1()
n += x.sizeField2()
return n
}
func (x *DouyinUserLoginRequest) sizeField1() (n int) {
if x.Username == "" {
return n
}
n += fastpb.SizeString(1, x.Username)
return n
}
func (x *DouyinUserLoginRequest) sizeField2() (n int) {
if x.Password == "" {
return n
}
n += fastpb.SizeString(2, x.Password)
return n
}
func (x *DouyinUserLoginResponse) Size() (n int) {
if x == nil {
return n
}
n += x.sizeField1()
n += x.sizeField2()
n += x.sizeField3()
return n
}
func (x *DouyinUserLoginResponse) sizeField1() (n int) {
if x.StatusCode == 0 {
return n
}
n += fastpb.SizeInt32(1, x.StatusCode)
return n
}
func (x *DouyinUserLoginResponse) sizeField2() (n int) {
if x.StatusMsg == "" {
return n
}
n += fastpb.SizeString(2, x.StatusMsg)
return n
}
func (x *DouyinUserLoginResponse) sizeField3() (n int) {
if x.UserId == 0 {
return n
}
n += fastpb.SizeInt64(3, x.UserId)
return n
}
func (x *DouyinUserRequest) Size() (n int) {
if x == nil {
return n
}
n += x.sizeField1()
return n
}
func (x *DouyinUserRequest) sizeField1() (n int) {
if x.UserId == 0 {
return n
}
n += fastpb.SizeInt64(1, x.UserId)
return n
}
func (x *DouyinUserResponse) Size() (n int) {
if x == nil {
return n
}
n += x.sizeField1()
n += x.sizeField2()
n += x.sizeField3()
return n
}
func (x *DouyinUserResponse) sizeField1() (n int) {
if x.StatusCode == 0 {
return n
}
n += fastpb.SizeInt32(1, x.StatusCode)
return n
}
func (x *DouyinUserResponse) sizeField2() (n int) {
if x.StatusMsg == "" {
return n
}
n += fastpb.SizeString(2, x.StatusMsg)
return n
}
func (x *DouyinUserResponse) sizeField3() (n int) {
if x.User == nil {
return n
}
n += fastpb.SizeMessage(3, x.User)
return n
}
func (x *DouyinUserListRequest) Size() (n int) {
if x == nil {
return n
}
n += x.sizeField1()
return n
}
func (x *DouyinUserListRequest) sizeField1() (n int) {
if len(x.UserList) == 0 {
return n
}
n += fastpb.SizeListPacked(1, len(x.UserList),
func(numTagOrKey, numIdxOrVal int32) int {
n := 0
n += fastpb.SizeInt64(numTagOrKey, x.UserList[numIdxOrVal])
return n
})
return n
}
func (x *DouyinUserListResponse) Size() (n int) {
if x == nil {
return n
}
n += x.sizeField1()
n += x.sizeField2()
n += x.sizeField3()
return n
}
func (x *DouyinUserListResponse) sizeField1() (n int) {
if x.StatusCode == 0 {
return n
}
n += fastpb.SizeInt32(1, x.StatusCode)
return n
}
func (x *DouyinUserListResponse) sizeField2() (n int) {
if x.StatusMsg == "" {
return n
}
n += fastpb.SizeString(2, x.StatusMsg)
return n
}
func (x *DouyinUserListResponse) sizeField3() (n int) {
if x.UserList == nil {
return n
}
for i := range x.UserList {
n += fastpb.SizeMessage(3, x.UserList[i])
}
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
}
var fieldIDToName_DouyinUserRegisterRequest = map[int32]string{
1: "Username",
2: "Password",
}
var fieldIDToName_DouyinUserRegisterResponse = map[int32]string{
1: "StatusCode",
2: "StatusMsg",
3: "UserId",
}
var fieldIDToName_DouyinUserLoginRequest = map[int32]string{
1: "Username",
2: "Password",
}
var fieldIDToName_DouyinUserLoginResponse = map[int32]string{
1: "StatusCode",
2: "StatusMsg",
3: "UserId",
}
var fieldIDToName_DouyinUserRequest = map[int32]string{
1: "UserId",
}
var fieldIDToName_DouyinUserResponse = map[int32]string{
1: "StatusCode",
2: "StatusMsg",
3: "User",
}
var fieldIDToName_DouyinUserListRequest = map[int32]string{
1: "UserList",
}
var fieldIDToName_DouyinUserListResponse = map[int32]string{
1: "StatusCode",
2: "StatusMsg",
3: "UserList",
}
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",
}