Documentation ¶
Index ¶
- type BaseResp
- func (p *BaseResp) GetCode() (v int64)
- func (p *BaseResp) GetMessage() (v string)
- func (p *BaseResp) Read(iprot thrift.TProtocol) (err error)
- func (p *BaseResp) ReadField1(iprot thrift.TProtocol) error
- func (p *BaseResp) ReadField2(iprot thrift.TProtocol) error
- func (p *BaseResp) String() string
- func (p *BaseResp) Write(oprot thrift.TProtocol) (err error)
- type LoginRequest
- func (p *LoginRequest) GetPassword() (v string)
- func (p *LoginRequest) GetUsername() (v string)
- func (p *LoginRequest) Read(iprot thrift.TProtocol) (err error)
- func (p *LoginRequest) ReadField1(iprot thrift.TProtocol) error
- func (p *LoginRequest) ReadField2(iprot thrift.TProtocol) error
- func (p *LoginRequest) String() string
- func (p *LoginRequest) Write(oprot thrift.TProtocol) (err error)
- type LoginResponse
- func (p *LoginResponse) GetBaseresp() (v *BaseResp)
- func (p *LoginResponse) IsSetBaseresp() bool
- func (p *LoginResponse) Read(iprot thrift.TProtocol) (err error)
- func (p *LoginResponse) ReadField1(iprot thrift.TProtocol) error
- func (p *LoginResponse) String() string
- func (p *LoginResponse) Write(oprot thrift.TProtocol) (err error)
- type RegisterRequest
- func (p *RegisterRequest) GetEmail() (v string)
- func (p *RegisterRequest) GetPassword() (v string)
- func (p *RegisterRequest) GetUsername() (v string)
- func (p *RegisterRequest) Read(iprot thrift.TProtocol) (err error)
- func (p *RegisterRequest) ReadField1(iprot thrift.TProtocol) error
- func (p *RegisterRequest) ReadField2(iprot thrift.TProtocol) error
- func (p *RegisterRequest) ReadField3(iprot thrift.TProtocol) error
- func (p *RegisterRequest) String() string
- func (p *RegisterRequest) Write(oprot thrift.TProtocol) (err error)
- type RegisterResponse
- func (p *RegisterResponse) GetBaseresp() (v *BaseResp)
- func (p *RegisterResponse) IsSetBaseresp() bool
- func (p *RegisterResponse) Read(iprot thrift.TProtocol) (err error)
- func (p *RegisterResponse) ReadField1(iprot thrift.TProtocol) error
- func (p *RegisterResponse) String() string
- func (p *RegisterResponse) Write(oprot thrift.TProtocol) (err error)
- type UserService
- type UserServiceClient
- type UserServiceLoginArgs
- func (p *UserServiceLoginArgs) GetReq() (v *LoginRequest)
- func (p *UserServiceLoginArgs) IsSetReq() bool
- func (p *UserServiceLoginArgs) Read(iprot thrift.TProtocol) (err error)
- func (p *UserServiceLoginArgs) ReadField1(iprot thrift.TProtocol) error
- func (p *UserServiceLoginArgs) String() string
- func (p *UserServiceLoginArgs) Write(oprot thrift.TProtocol) (err error)
- type UserServiceLoginResult
- func (p *UserServiceLoginResult) GetSuccess() (v *LoginResponse)
- func (p *UserServiceLoginResult) IsSetSuccess() bool
- func (p *UserServiceLoginResult) Read(iprot thrift.TProtocol) (err error)
- func (p *UserServiceLoginResult) ReadField0(iprot thrift.TProtocol) error
- func (p *UserServiceLoginResult) String() string
- func (p *UserServiceLoginResult) Write(oprot thrift.TProtocol) (err error)
- type UserServiceProcessor
- func (p *UserServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)
- func (p *UserServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)
- func (p *UserServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)
- func (p *UserServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction
- type UserServiceRegisterArgs
- func (p *UserServiceRegisterArgs) GetReq() (v *RegisterRequest)
- func (p *UserServiceRegisterArgs) IsSetReq() bool
- func (p *UserServiceRegisterArgs) Read(iprot thrift.TProtocol) (err error)
- func (p *UserServiceRegisterArgs) ReadField1(iprot thrift.TProtocol) error
- func (p *UserServiceRegisterArgs) String() string
- func (p *UserServiceRegisterArgs) Write(oprot thrift.TProtocol) (err error)
- type UserServiceRegisterResult
- func (p *UserServiceRegisterResult) GetSuccess() (v *RegisterResponse)
- func (p *UserServiceRegisterResult) IsSetSuccess() bool
- func (p *UserServiceRegisterResult) Read(iprot thrift.TProtocol) (err error)
- func (p *UserServiceRegisterResult) ReadField0(iprot thrift.TProtocol) error
- func (p *UserServiceRegisterResult) String() string
- func (p *UserServiceRegisterResult) Write(oprot thrift.TProtocol) (err error)
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) GetMessage ¶
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) 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
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) ReadField1 ¶
func (p *LoginResponse) ReadField1(iprot thrift.TProtocol) error
func (*LoginResponse) String ¶
func (p *LoginResponse) String() string
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) 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
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) ReadField1 ¶
func (p *RegisterResponse) ReadField1(iprot thrift.TProtocol) error
func (*RegisterResponse) String ¶
func (p *RegisterResponse) String() string
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 NewUserServiceClientFactory ¶
func NewUserServiceClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *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
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
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
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
Click to show internal directories.
Click to hide internal directories.