user

package
v0.0.0-...-542fe02 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserInfoResponse_StatusMsg_DEFAULT string
View Source
var UserLoginResponse_StatusMsg_DEFAULT string
View Source
var UserRegisterResponse_StatusMsg_DEFAULT string

Functions

This section is empty.

Types

type User

type User struct {
	// 用户id
	ID int64 `thrift:"id,1" form:"id" json:"id" query:"id"`
	// 用户名称
	Name string `thrift:"name,2" form:"name" json:"name" query:"name"`
	// 关注总数
	FollowCount int64 `thrift:"follow_count,3" form:"follow_count" json:"follow_count" query:"follow_count"`
	// 粉丝总数
	FollowerCount int64 `thrift:"follower_count,4" form:"follower_count" json:"follower_count" query:"follower_count"`
	// true-已关注,false-未关注
	IsFollow bool `thrift:"is_follow,5" form:"is_follow" json:"is_follow" query:"is_follow"`
	// 用户头像
	Avatar string `thrift:"avatar,6" form:"avatar" json:"avatar" query:"avatar"`
	// 用户个人页顶部大图
	BackgroundImage string `thrift:"background_image,7" form:"background_image" json:"background_image" query:"background_image"`
	// 个人简介
	Signature string `thrift:"signature,8" form:"signature" json:"signature" query:"signature"`
	// 获赞数量
	TotalFavorited int64 `thrift:"total_favorited,9" form:"total_favorited" json:"total_favorited" query:"total_favorited"`
	// 作品数量
	WorkCount int64 `thrift:"work_count,10" form:"work_count" json:"work_count" query:"work_count"`
	// 点赞数量
	FavoriteCount int64 `thrift:"favorite_count,11" form:"favorite_count" json:"favorite_count" query:"favorite_count"`
}
var UserInfoResponse_User_DEFAULT *User

func NewUser

func NewUser() *User

func (*User) GetAvatar

func (p *User) GetAvatar() (v string)

func (*User) GetBackgroundImage

func (p *User) GetBackgroundImage() (v string)

func (*User) GetFavoriteCount

func (p *User) GetFavoriteCount() (v int64)

func (*User) GetFollowCount

func (p *User) GetFollowCount() (v int64)

func (*User) GetFollowerCount

func (p *User) GetFollowerCount() (v int64)

func (*User) GetID

func (p *User) GetID() (v int64)

func (*User) GetIsFollow

func (p *User) GetIsFollow() (v bool)

func (*User) GetName

func (p *User) GetName() (v string)

func (*User) GetSignature

func (p *User) GetSignature() (v string)

func (*User) GetTotalFavorited

func (p *User) GetTotalFavorited() (v int64)

func (*User) GetWorkCount

func (p *User) GetWorkCount() (v int64)

func (*User) Read

func (p *User) Read(iprot thrift.TProtocol) (err error)

func (*User) ReadField1

func (p *User) ReadField1(iprot thrift.TProtocol) error

func (*User) ReadField10

func (p *User) ReadField10(iprot thrift.TProtocol) error

func (*User) ReadField11

func (p *User) ReadField11(iprot thrift.TProtocol) error

func (*User) ReadField2

func (p *User) ReadField2(iprot thrift.TProtocol) error

func (*User) ReadField3

func (p *User) ReadField3(iprot thrift.TProtocol) error

func (*User) ReadField4

func (p *User) ReadField4(iprot thrift.TProtocol) error

func (*User) ReadField5

func (p *User) ReadField5(iprot thrift.TProtocol) error

func (*User) ReadField6

func (p *User) ReadField6(iprot thrift.TProtocol) error

func (*User) ReadField7

func (p *User) ReadField7(iprot thrift.TProtocol) error

func (*User) ReadField8

func (p *User) ReadField8(iprot thrift.TProtocol) error

func (*User) ReadField9

func (p *User) ReadField9(iprot thrift.TProtocol) error

func (*User) String

func (p *User) String() string

func (*User) Write

func (p *User) Write(oprot thrift.TProtocol) (err error)

type UserInfoRequest

type UserInfoRequest struct {
	// 用户id
	UserID int64 `thrift:"user_id,1" json:"user_id" query:"user_id"`
	// 用户鉴权token
	Token string `thrift:"token,2" json:"token" query:"token"`
}
var UserServiceUserInfoArgs_Req_DEFAULT *UserInfoRequest

func NewUserInfoRequest

func NewUserInfoRequest() *UserInfoRequest

func (*UserInfoRequest) GetToken

func (p *UserInfoRequest) GetToken() (v string)

func (*UserInfoRequest) GetUserID

func (p *UserInfoRequest) GetUserID() (v int64)

func (*UserInfoRequest) Read

func (p *UserInfoRequest) Read(iprot thrift.TProtocol) (err error)

func (*UserInfoRequest) ReadField1

func (p *UserInfoRequest) ReadField1(iprot thrift.TProtocol) error

func (*UserInfoRequest) ReadField2

func (p *UserInfoRequest) ReadField2(iprot thrift.TProtocol) error

func (*UserInfoRequest) String

func (p *UserInfoRequest) String() string

func (*UserInfoRequest) Write

func (p *UserInfoRequest) Write(oprot thrift.TProtocol) (err error)

type UserInfoResponse

type UserInfoResponse struct {
	// 状态码,0-成功,其他值-失败
	StatusCode int32 `thrift:"status_code,1" form:"status_code" json:"status_code" query:"status_code"`
	// 返回状态描述
	StatusMsg *string `thrift:"status_msg,2,optional" form:"status_msg" json:"status_msg,omitempty" query:"status_msg"`
	// 用户信息
	User *User `thrift:"user,3" form:"user" json:"user" query:"user"`
}
var UserServiceUserInfoResult_Success_DEFAULT *UserInfoResponse

func NewUserInfoResponse

func NewUserInfoResponse() *UserInfoResponse

func (*UserInfoResponse) GetStatusCode

func (p *UserInfoResponse) GetStatusCode() (v int32)

func (*UserInfoResponse) GetStatusMsg

func (p *UserInfoResponse) GetStatusMsg() (v string)

func (*UserInfoResponse) GetUser

func (p *UserInfoResponse) GetUser() (v *User)

func (*UserInfoResponse) IsSetStatusMsg

func (p *UserInfoResponse) IsSetStatusMsg() bool

func (*UserInfoResponse) IsSetUser

func (p *UserInfoResponse) IsSetUser() bool

func (*UserInfoResponse) Read

func (p *UserInfoResponse) Read(iprot thrift.TProtocol) (err error)

func (*UserInfoResponse) ReadField1

func (p *UserInfoResponse) ReadField1(iprot thrift.TProtocol) error

func (*UserInfoResponse) ReadField2

func (p *UserInfoResponse) ReadField2(iprot thrift.TProtocol) error

func (*UserInfoResponse) ReadField3

func (p *UserInfoResponse) ReadField3(iprot thrift.TProtocol) error

func (*UserInfoResponse) String

func (p *UserInfoResponse) String() string

func (*UserInfoResponse) Write

func (p *UserInfoResponse) Write(oprot thrift.TProtocol) (err error)

type UserLoginRequest

type UserLoginRequest struct {
	// 登录用户名
	Username string `thrift:"username,1" json:"username" query:"username"`
	// 登录密码
	Password string `thrift:"password,2" json:"password" query:"password"`
}
var UserServiceUserLoginArgs_Req_DEFAULT *UserLoginRequest

func NewUserLoginRequest

func NewUserLoginRequest() *UserLoginRequest

func (*UserLoginRequest) GetPassword

func (p *UserLoginRequest) GetPassword() (v string)

func (*UserLoginRequest) GetUsername

func (p *UserLoginRequest) GetUsername() (v string)

func (*UserLoginRequest) Read

func (p *UserLoginRequest) Read(iprot thrift.TProtocol) (err error)

func (*UserLoginRequest) ReadField1

func (p *UserLoginRequest) ReadField1(iprot thrift.TProtocol) error

func (*UserLoginRequest) ReadField2

func (p *UserLoginRequest) ReadField2(iprot thrift.TProtocol) error

func (*UserLoginRequest) String

func (p *UserLoginRequest) String() string

func (*UserLoginRequest) Write

func (p *UserLoginRequest) Write(oprot thrift.TProtocol) (err error)

type UserLoginResponse

type UserLoginResponse struct {
	// 状态码,0-成功,其他值-失败
	StatusCode int32 `thrift:"status_code,1" form:"status_code" json:"status_code" query:"status_code"`
	// 返回状态描述
	StatusMsg *string `thrift:"status_msg,2,optional" form:"status_msg" json:"status_msg,omitempty" query:"status_msg"`
	// 用户id
	UserID int64 `thrift:"user_id,3" form:"user_id" json:"user_id" query:"user_id"`
	// 用户鉴权token
	Token string `thrift:"token,4" form:"token" json:"token" query:"token"`
}
var UserServiceUserLoginResult_Success_DEFAULT *UserLoginResponse

func NewUserLoginResponse

func NewUserLoginResponse() *UserLoginResponse

func (*UserLoginResponse) GetStatusCode

func (p *UserLoginResponse) GetStatusCode() (v int32)

func (*UserLoginResponse) GetStatusMsg

func (p *UserLoginResponse) GetStatusMsg() (v string)

func (*UserLoginResponse) GetToken

func (p *UserLoginResponse) GetToken() (v string)

func (*UserLoginResponse) GetUserID

func (p *UserLoginResponse) GetUserID() (v int64)

func (*UserLoginResponse) IsSetStatusMsg

func (p *UserLoginResponse) IsSetStatusMsg() bool

func (*UserLoginResponse) Read

func (p *UserLoginResponse) Read(iprot thrift.TProtocol) (err error)

func (*UserLoginResponse) ReadField1

func (p *UserLoginResponse) ReadField1(iprot thrift.TProtocol) error

func (*UserLoginResponse) ReadField2

func (p *UserLoginResponse) ReadField2(iprot thrift.TProtocol) error

func (*UserLoginResponse) ReadField3

func (p *UserLoginResponse) ReadField3(iprot thrift.TProtocol) error

func (*UserLoginResponse) ReadField4

func (p *UserLoginResponse) ReadField4(iprot thrift.TProtocol) error

func (*UserLoginResponse) String

func (p *UserLoginResponse) String() string

func (*UserLoginResponse) Write

func (p *UserLoginResponse) Write(oprot thrift.TProtocol) (err error)

type UserRegisterRequest

type UserRegisterRequest struct {
	// 注册用户名,最长32个字符
	Username string `thrift:"username,1" json:"username" query:"username"`
	// 密码,最长32个字符
	Password string `thrift:"password,2" json:"password" query:"password"`
}
var UserServiceUserRegisterArgs_Req_DEFAULT *UserRegisterRequest

func NewUserRegisterRequest

func NewUserRegisterRequest() *UserRegisterRequest

func (*UserRegisterRequest) GetPassword

func (p *UserRegisterRequest) GetPassword() (v string)

func (*UserRegisterRequest) GetUsername

func (p *UserRegisterRequest) GetUsername() (v string)

func (*UserRegisterRequest) Read

func (p *UserRegisterRequest) Read(iprot thrift.TProtocol) (err error)

func (*UserRegisterRequest) ReadField1

func (p *UserRegisterRequest) ReadField1(iprot thrift.TProtocol) error

func (*UserRegisterRequest) ReadField2

func (p *UserRegisterRequest) ReadField2(iprot thrift.TProtocol) error

func (*UserRegisterRequest) String

func (p *UserRegisterRequest) String() string

func (*UserRegisterRequest) Write

func (p *UserRegisterRequest) Write(oprot thrift.TProtocol) (err error)

type UserRegisterResponse

type UserRegisterResponse struct {
	// 状态码,0-成功,其他值-失败
	StatusCode int32 `thrift:"status_code,1" form:"status_code" json:"status_code" query:"status_code"`
	// 返回状态描述
	StatusMsg *string `thrift:"status_msg,2,optional" form:"status_msg" json:"status_msg,omitempty" query:"status_msg"`
	// 用户id
	UserID int64 `thrift:"user_id,3" form:"user_id" json:"user_id" query:"user_id"`
	// 用户鉴权token
	Token string `thrift:"token,4" form:"token" json:"token" query:"token"`
}
var UserServiceUserRegisterResult_Success_DEFAULT *UserRegisterResponse

func NewUserRegisterResponse

func NewUserRegisterResponse() *UserRegisterResponse

func (*UserRegisterResponse) GetStatusCode

func (p *UserRegisterResponse) GetStatusCode() (v int32)

func (*UserRegisterResponse) GetStatusMsg

func (p *UserRegisterResponse) GetStatusMsg() (v string)

func (*UserRegisterResponse) GetToken

func (p *UserRegisterResponse) GetToken() (v string)

func (*UserRegisterResponse) GetUserID

func (p *UserRegisterResponse) GetUserID() (v int64)

func (*UserRegisterResponse) IsSetStatusMsg

func (p *UserRegisterResponse) IsSetStatusMsg() bool

func (*UserRegisterResponse) Read

func (p *UserRegisterResponse) Read(iprot thrift.TProtocol) (err error)

func (*UserRegisterResponse) ReadField1

func (p *UserRegisterResponse) ReadField1(iprot thrift.TProtocol) error

func (*UserRegisterResponse) ReadField2

func (p *UserRegisterResponse) ReadField2(iprot thrift.TProtocol) error

func (*UserRegisterResponse) ReadField3

func (p *UserRegisterResponse) ReadField3(iprot thrift.TProtocol) error

func (*UserRegisterResponse) ReadField4

func (p *UserRegisterResponse) ReadField4(iprot thrift.TProtocol) error

func (*UserRegisterResponse) String

func (p *UserRegisterResponse) String() string

func (*UserRegisterResponse) Write

func (p *UserRegisterResponse) Write(oprot thrift.TProtocol) (err error)

type UserService

type UserService interface {
	// 用户注册操作
	UserRegister(ctx context.Context, req *UserRegisterRequest) (r *UserRegisterResponse, err error)
	// 用户登录操作
	UserLogin(ctx context.Context, req *UserLoginRequest) (r *UserLoginResponse, err error)
	// 获取用户信息
	UserInfo(ctx context.Context, req *UserInfoRequest) (r *UserInfoResponse, err error)
}

type UserServiceClient

type UserServiceClient struct {
	// contains filtered or unexported fields
}

func NewUserServiceClient

func NewUserServiceClient(c thrift.TClient) *UserServiceClient

func NewUserServiceClientProtocol

func NewUserServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *UserServiceClient

func (*UserServiceClient) Client_

func (p *UserServiceClient) Client_() thrift.TClient

func (*UserServiceClient) UserInfo

func (p *UserServiceClient) UserInfo(ctx context.Context, req *UserInfoRequest) (r *UserInfoResponse, err error)

func (*UserServiceClient) UserLogin

func (p *UserServiceClient) UserLogin(ctx context.Context, req *UserLoginRequest) (r *UserLoginResponse, err error)

func (*UserServiceClient) UserRegister

func (p *UserServiceClient) UserRegister(ctx context.Context, req *UserRegisterRequest) (r *UserRegisterResponse, err error)

type UserServiceProcessor

type UserServiceProcessor struct {
	// contains filtered or unexported fields
}

func NewUserServiceProcessor

func NewUserServiceProcessor(handler UserService) *UserServiceProcessor

func (*UserServiceProcessor) AddToProcessorMap

func (p *UserServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)

func (*UserServiceProcessor) GetProcessorFunction

func (p *UserServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)

func (*UserServiceProcessor) Process

func (p *UserServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)

func (*UserServiceProcessor) ProcessorMap

func (p *UserServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction

type UserServiceUserInfoArgs

type UserServiceUserInfoArgs struct {
	Req *UserInfoRequest `thrift:"req,1"`
}

func NewUserServiceUserInfoArgs

func NewUserServiceUserInfoArgs() *UserServiceUserInfoArgs

func (*UserServiceUserInfoArgs) GetReq

func (p *UserServiceUserInfoArgs) GetReq() (v *UserInfoRequest)

func (*UserServiceUserInfoArgs) IsSetReq

func (p *UserServiceUserInfoArgs) IsSetReq() bool

func (*UserServiceUserInfoArgs) Read

func (p *UserServiceUserInfoArgs) Read(iprot thrift.TProtocol) (err error)

func (*UserServiceUserInfoArgs) ReadField1

func (p *UserServiceUserInfoArgs) ReadField1(iprot thrift.TProtocol) error

func (*UserServiceUserInfoArgs) String

func (p *UserServiceUserInfoArgs) String() string

func (*UserServiceUserInfoArgs) Write

func (p *UserServiceUserInfoArgs) Write(oprot thrift.TProtocol) (err error)

type UserServiceUserInfoResult

type UserServiceUserInfoResult struct {
	Success *UserInfoResponse `thrift:"success,0,optional"`
}

func NewUserServiceUserInfoResult

func NewUserServiceUserInfoResult() *UserServiceUserInfoResult

func (*UserServiceUserInfoResult) GetSuccess

func (p *UserServiceUserInfoResult) GetSuccess() (v *UserInfoResponse)

func (*UserServiceUserInfoResult) IsSetSuccess

func (p *UserServiceUserInfoResult) IsSetSuccess() bool

func (*UserServiceUserInfoResult) Read

func (p *UserServiceUserInfoResult) Read(iprot thrift.TProtocol) (err error)

func (*UserServiceUserInfoResult) ReadField0

func (p *UserServiceUserInfoResult) ReadField0(iprot thrift.TProtocol) error

func (*UserServiceUserInfoResult) String

func (p *UserServiceUserInfoResult) String() string

func (*UserServiceUserInfoResult) Write

func (p *UserServiceUserInfoResult) Write(oprot thrift.TProtocol) (err error)

type UserServiceUserLoginArgs

type UserServiceUserLoginArgs struct {
	Req *UserLoginRequest `thrift:"req,1"`
}

func NewUserServiceUserLoginArgs

func NewUserServiceUserLoginArgs() *UserServiceUserLoginArgs

func (*UserServiceUserLoginArgs) GetReq

func (p *UserServiceUserLoginArgs) GetReq() (v *UserLoginRequest)

func (*UserServiceUserLoginArgs) IsSetReq

func (p *UserServiceUserLoginArgs) IsSetReq() bool

func (*UserServiceUserLoginArgs) Read

func (p *UserServiceUserLoginArgs) Read(iprot thrift.TProtocol) (err error)

func (*UserServiceUserLoginArgs) ReadField1

func (p *UserServiceUserLoginArgs) ReadField1(iprot thrift.TProtocol) error

func (*UserServiceUserLoginArgs) String

func (p *UserServiceUserLoginArgs) String() string

func (*UserServiceUserLoginArgs) Write

func (p *UserServiceUserLoginArgs) Write(oprot thrift.TProtocol) (err error)

type UserServiceUserLoginResult

type UserServiceUserLoginResult struct {
	Success *UserLoginResponse `thrift:"success,0,optional"`
}

func NewUserServiceUserLoginResult

func NewUserServiceUserLoginResult() *UserServiceUserLoginResult

func (*UserServiceUserLoginResult) GetSuccess

func (p *UserServiceUserLoginResult) GetSuccess() (v *UserLoginResponse)

func (*UserServiceUserLoginResult) IsSetSuccess

func (p *UserServiceUserLoginResult) IsSetSuccess() bool

func (*UserServiceUserLoginResult) Read

func (p *UserServiceUserLoginResult) Read(iprot thrift.TProtocol) (err error)

func (*UserServiceUserLoginResult) ReadField0

func (p *UserServiceUserLoginResult) ReadField0(iprot thrift.TProtocol) error

func (*UserServiceUserLoginResult) String

func (p *UserServiceUserLoginResult) String() string

func (*UserServiceUserLoginResult) Write

func (p *UserServiceUserLoginResult) Write(oprot thrift.TProtocol) (err error)

type UserServiceUserRegisterArgs

type UserServiceUserRegisterArgs struct {
	Req *UserRegisterRequest `thrift:"req,1"`
}

func NewUserServiceUserRegisterArgs

func NewUserServiceUserRegisterArgs() *UserServiceUserRegisterArgs

func (*UserServiceUserRegisterArgs) GetReq

func (*UserServiceUserRegisterArgs) IsSetReq

func (p *UserServiceUserRegisterArgs) IsSetReq() bool

func (*UserServiceUserRegisterArgs) Read

func (p *UserServiceUserRegisterArgs) Read(iprot thrift.TProtocol) (err error)

func (*UserServiceUserRegisterArgs) ReadField1

func (p *UserServiceUserRegisterArgs) ReadField1(iprot thrift.TProtocol) error

func (*UserServiceUserRegisterArgs) String

func (p *UserServiceUserRegisterArgs) String() string

func (*UserServiceUserRegisterArgs) Write

func (p *UserServiceUserRegisterArgs) Write(oprot thrift.TProtocol) (err error)

type UserServiceUserRegisterResult

type UserServiceUserRegisterResult struct {
	Success *UserRegisterResponse `thrift:"success,0,optional"`
}

func NewUserServiceUserRegisterResult

func NewUserServiceUserRegisterResult() *UserServiceUserRegisterResult

func (*UserServiceUserRegisterResult) GetSuccess

func (*UserServiceUserRegisterResult) IsSetSuccess

func (p *UserServiceUserRegisterResult) IsSetSuccess() bool

func (*UserServiceUserRegisterResult) Read

func (p *UserServiceUserRegisterResult) Read(iprot thrift.TProtocol) (err error)

func (*UserServiceUserRegisterResult) ReadField0

func (p *UserServiceUserRegisterResult) ReadField0(iprot thrift.TProtocol) error

func (*UserServiceUserRegisterResult) String

func (*UserServiceUserRegisterResult) Write

func (p *UserServiceUserRegisterResult) Write(oprot thrift.TProtocol) (err error)

Jump to

Keyboard shortcuts

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