user

package
v0.0.0-...-231a1a8 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseResp

type BaseResp struct {
	Code    int64  `thrift:"code,1" form:"code" json:"code" query:"code"`
	Message string `thrift:"message,2" form:"message" json:"message" query:"message"`
}
var LoginResponse_Baseresp_DEFAULT *BaseResp
var RegisterResponse_Baseresp_DEFAULT *BaseResp

func NewBaseResp

func NewBaseResp() *BaseResp

func (*BaseResp) GetCode

func (p *BaseResp) GetCode() (v int64)

func (*BaseResp) GetMessage

func (p *BaseResp) GetMessage() (v string)

func (*BaseResp) Read

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

func (*BaseResp) ReadField1

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

func (*BaseResp) ReadField2

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

func (*BaseResp) String

func (p *BaseResp) String() string

func (*BaseResp) Write

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

type LoginRequest

type LoginRequest struct {
	Username string `thrift:"username,1" form:"username" json:"username" vd:"(len($) > 0 && len($) < 30); msg:'Illegal format'"`
	Password string `thrift:"password,2" form:"password" json:"password" vd:"(len($) > 0 && len($) < 30); msg:'Illegal format'"`
}
var UserServiceLoginArgs_Req_DEFAULT *LoginRequest

func NewLoginRequest

func NewLoginRequest() *LoginRequest

func (*LoginRequest) GetPassword

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

func (*LoginRequest) GetUsername

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

func (*LoginRequest) Read

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

func (*LoginRequest) ReadField1

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

func (*LoginRequest) ReadField2

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

func (*LoginRequest) String

func (p *LoginRequest) String() string

func (*LoginRequest) Write

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

type LoginResponse

type LoginResponse struct {
	Baseresp *BaseResp `thrift:"baseresp,1" form:"baseresp" json:"baseresp" query:"baseresp"`
}
var UserServiceLoginResult_Success_DEFAULT *LoginResponse

func NewLoginResponse

func NewLoginResponse() *LoginResponse

func (*LoginResponse) GetBaseresp

func (p *LoginResponse) GetBaseresp() (v *BaseResp)

func (*LoginResponse) IsSetBaseresp

func (p *LoginResponse) IsSetBaseresp() bool

func (*LoginResponse) Read

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

func (*LoginResponse) ReadField1

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

func (*LoginResponse) String

func (p *LoginResponse) String() string

func (*LoginResponse) Write

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

type RegisterRequest

type RegisterRequest struct {
	Username string `thrift:"username,1" form:"username" json:"username" vd:"(len($) > 0 && len($) < 128); msg:'Illegal format'"`
	Password string `thrift:"password,2" form:"password" json:"password" vd:"(len($) > 0 && len($) < 128); msg:'Illegal format'"`
	Email    string `thrift:"email,3" form:"email" json:"email" vd:"(len($) > 0 && len($) < 128) && email($); msg:'Illegal format'"`
}
var UserServiceRegisterArgs_Req_DEFAULT *RegisterRequest

func NewRegisterRequest

func NewRegisterRequest() *RegisterRequest

func (*RegisterRequest) GetEmail

func (p *RegisterRequest) GetEmail() (v string)

func (*RegisterRequest) GetPassword

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

func (*RegisterRequest) GetUsername

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

func (*RegisterRequest) Read

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

func (*RegisterRequest) ReadField1

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

func (*RegisterRequest) ReadField2

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

func (*RegisterRequest) ReadField3

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

func (*RegisterRequest) String

func (p *RegisterRequest) String() string

func (*RegisterRequest) Write

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

type RegisterResponse

type RegisterResponse struct {
	Baseresp *BaseResp `thrift:"baseresp,1" form:"baseresp" json:"baseresp" query:"baseresp"`
}
var UserServiceRegisterResult_Success_DEFAULT *RegisterResponse

func NewRegisterResponse

func NewRegisterResponse() *RegisterResponse

func (*RegisterResponse) GetBaseresp

func (p *RegisterResponse) GetBaseresp() (v *BaseResp)

func (*RegisterResponse) IsSetBaseresp

func (p *RegisterResponse) IsSetBaseresp() bool

func (*RegisterResponse) Read

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

func (*RegisterResponse) ReadField1

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

func (*RegisterResponse) String

func (p *RegisterResponse) String() string

func (*RegisterResponse) Write

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

type UserService

type UserService interface {
	Register(ctx context.Context, req *RegisterRequest) (r *RegisterResponse, err error)

	Login(ctx context.Context, req *LoginRequest) (r *LoginResponse, 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) Login

func (p *UserServiceClient) Login(ctx context.Context, req *LoginRequest) (r *LoginResponse, err error)

func (*UserServiceClient) Register

func (p *UserServiceClient) Register(ctx context.Context, req *RegisterRequest) (r *RegisterResponse, err error)

type UserServiceLoginArgs

type UserServiceLoginArgs struct {
	Req *LoginRequest `thrift:"req,1"`
}

func NewUserServiceLoginArgs

func NewUserServiceLoginArgs() *UserServiceLoginArgs

func (*UserServiceLoginArgs) GetReq

func (p *UserServiceLoginArgs) GetReq() (v *LoginRequest)

func (*UserServiceLoginArgs) IsSetReq

func (p *UserServiceLoginArgs) IsSetReq() bool

func (*UserServiceLoginArgs) Read

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

func (*UserServiceLoginArgs) ReadField1

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

func (*UserServiceLoginArgs) String

func (p *UserServiceLoginArgs) String() string

func (*UserServiceLoginArgs) Write

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

type UserServiceLoginResult

type UserServiceLoginResult struct {
	Success *LoginResponse `thrift:"success,0,optional"`
}

func NewUserServiceLoginResult

func NewUserServiceLoginResult() *UserServiceLoginResult

func (*UserServiceLoginResult) GetSuccess

func (p *UserServiceLoginResult) GetSuccess() (v *LoginResponse)

func (*UserServiceLoginResult) IsSetSuccess

func (p *UserServiceLoginResult) IsSetSuccess() bool

func (*UserServiceLoginResult) Read

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

func (*UserServiceLoginResult) ReadField0

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

func (*UserServiceLoginResult) String

func (p *UserServiceLoginResult) String() string

func (*UserServiceLoginResult) Write

func (p *UserServiceLoginResult) Write(oprot thrift.TProtocol) (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 UserServiceRegisterArgs

type UserServiceRegisterArgs struct {
	Req *RegisterRequest `thrift:"req,1"`
}

func NewUserServiceRegisterArgs

func NewUserServiceRegisterArgs() *UserServiceRegisterArgs

func (*UserServiceRegisterArgs) GetReq

func (p *UserServiceRegisterArgs) GetReq() (v *RegisterRequest)

func (*UserServiceRegisterArgs) IsSetReq

func (p *UserServiceRegisterArgs) IsSetReq() bool

func (*UserServiceRegisterArgs) Read

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

func (*UserServiceRegisterArgs) ReadField1

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

func (*UserServiceRegisterArgs) String

func (p *UserServiceRegisterArgs) String() string

func (*UserServiceRegisterArgs) Write

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

type UserServiceRegisterResult

type UserServiceRegisterResult struct {
	Success *RegisterResponse `thrift:"success,0,optional"`
}

func NewUserServiceRegisterResult

func NewUserServiceRegisterResult() *UserServiceRegisterResult

func (*UserServiceRegisterResult) GetSuccess

func (p *UserServiceRegisterResult) GetSuccess() (v *RegisterResponse)

func (*UserServiceRegisterResult) IsSetSuccess

func (p *UserServiceRegisterResult) IsSetSuccess() bool

func (*UserServiceRegisterResult) Read

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

func (*UserServiceRegisterResult) ReadField0

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

func (*UserServiceRegisterResult) String

func (p *UserServiceRegisterResult) String() string

func (*UserServiceRegisterResult) Write

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

Jump to

Keyboard shortcuts

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