Documentation ¶
Index ¶
- Variables
- func RegisterUserServer(s *grpc.Server, srv UserServer)
- type CheckTokenReq
- func (*CheckTokenReq) Descriptor() ([]byte, []int)deprecated
- func (x *CheckTokenReq) GetIp() string
- func (x *CheckTokenReq) GetToken() string
- func (*CheckTokenReq) ProtoMessage()
- func (x *CheckTokenReq) ProtoReflect() protoreflect.Message
- func (x *CheckTokenReq) Reset()
- func (x *CheckTokenReq) String() string
- type CheckTokenResp
- func (*CheckTokenResp) Descriptor() ([]byte, []int)deprecated
- func (x *CheckTokenResp) GetToken() string
- func (x *CheckTokenResp) GetUid() int64
- func (*CheckTokenResp) ProtoMessage()
- func (x *CheckTokenResp) ProtoReflect() protoreflect.Message
- func (x *CheckTokenResp) Reset()
- func (x *CheckTokenResp) String() string
- type GetUserInfoReq
- type GetUserInfoResp
- type JwtToken
- func (*JwtToken) Descriptor() ([]byte, []int)deprecated
- func (x *JwtToken) GetAccessExpire() int64
- func (x *JwtToken) GetAccessToken() string
- func (x *JwtToken) GetRefreshAfter() int64
- func (*JwtToken) ProtoMessage()
- func (x *JwtToken) ProtoReflect() protoreflect.Message
- func (x *JwtToken) Reset()
- func (x *JwtToken) String() string
- type LoginReq
- func (*LoginReq) Descriptor() ([]byte, []int)deprecated
- func (x *LoginReq) GetCode() string
- func (x *LoginReq) GetCodeID() string
- func (x *LoginReq) GetLoginType() string
- func (x *LoginReq) GetPassword() string
- func (x *LoginReq) GetPwdType() int32
- func (x *LoginReq) GetUserID() string
- func (*LoginReq) ProtoMessage()
- func (x *LoginReq) ProtoReflect() protoreflect.Message
- func (x *LoginReq) Reset()
- func (x *LoginReq) String() string
- type LoginResp
- type ModifyUserInfoReq
- func (*ModifyUserInfoReq) Descriptor() ([]byte, []int)deprecated
- func (x *ModifyUserInfoReq) GetInfo() map[string]string
- func (x *ModifyUserInfoReq) GetUid() int64
- func (*ModifyUserInfoReq) ProtoMessage()
- func (x *ModifyUserInfoReq) ProtoReflect() protoreflect.Message
- func (x *ModifyUserInfoReq) Reset()
- func (x *ModifyUserInfoReq) String() string
- type NilResp
- type Register2Req
- func (*Register2Req) Descriptor() ([]byte, []int)deprecated
- func (x *Register2Req) GetInfo() *UserInfo
- func (x *Register2Req) GetPassword() string
- func (*Register2Req) ProtoMessage()
- func (x *Register2Req) ProtoReflect() protoreflect.Message
- func (x *Register2Req) Reset()
- func (x *Register2Req) String() string
- type Register2Resp
- type RegisterCoreReq
- func (*RegisterCoreReq) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterCoreReq) GetCode() string
- func (x *RegisterCoreReq) GetCodeID() string
- func (x *RegisterCoreReq) GetNote() string
- func (x *RegisterCoreReq) GetReqType() string
- func (*RegisterCoreReq) ProtoMessage()
- func (x *RegisterCoreReq) ProtoReflect() protoreflect.Message
- func (x *RegisterCoreReq) Reset()
- func (x *RegisterCoreReq) String() string
- type RegisterCoreResp
- type UnimplementedUserServer
- func (*UnimplementedUserServer) CheckToken(context.Context, *CheckTokenReq) (*CheckTokenResp, error)
- func (*UnimplementedUserServer) GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error)
- func (*UnimplementedUserServer) Login(context.Context, *LoginReq) (*LoginResp, error)
- func (*UnimplementedUserServer) ModifyUserInfo(context.Context, *ModifyUserInfoReq) (*NilResp, error)
- func (*UnimplementedUserServer) Register2(context.Context, *Register2Req) (*Register2Resp, error)
- func (*UnimplementedUserServer) RegisterCore(context.Context, *RegisterCoreReq) (*RegisterCoreResp, error)
- type UserClient
- type UserInfo
- func (*UserInfo) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfo) GetCity() string
- func (x *UserInfo) GetCountry() string
- func (x *UserInfo) GetCreateTime() int64
- func (x *UserInfo) GetHeadImgUrl() string
- func (x *UserInfo) GetInviterId() string
- func (x *UserInfo) GetInviterUid() int64
- func (x *UserInfo) GetLanguage() string
- func (x *UserInfo) GetNickName() string
- func (x *UserInfo) GetProvince() string
- func (x *UserInfo) GetSex() int64
- func (x *UserInfo) GetUid() int64
- func (x *UserInfo) GetUserName() string
- func (*UserInfo) ProtoMessage()
- func (x *UserInfo) ProtoReflect() protoreflect.Message
- func (x *UserInfo) Reset()
- func (x *UserInfo) String() string
- type UserServer
Constants ¶
This section is empty.
Variables ¶
var File_user_proto protoreflect.FileDescriptor
Functions ¶
func RegisterUserServer ¶
func RegisterUserServer(s *grpc.Server, srv UserServer)
Types ¶
type CheckTokenReq ¶
type CheckTokenReq struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` // contains filtered or unexported fields }
func (*CheckTokenReq) Descriptor
deprecated
func (*CheckTokenReq) Descriptor() ([]byte, []int)
Deprecated: Use CheckTokenReq.ProtoReflect.Descriptor instead.
func (*CheckTokenReq) GetIp ¶
func (x *CheckTokenReq) GetIp() string
func (*CheckTokenReq) GetToken ¶
func (x *CheckTokenReq) GetToken() string
func (*CheckTokenReq) ProtoMessage ¶
func (*CheckTokenReq) ProtoMessage()
func (*CheckTokenReq) ProtoReflect ¶
func (x *CheckTokenReq) ProtoReflect() protoreflect.Message
func (*CheckTokenReq) Reset ¶
func (x *CheckTokenReq) Reset()
func (*CheckTokenReq) String ¶
func (x *CheckTokenReq) String() string
type CheckTokenResp ¶
type CheckTokenResp struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` //如果时间不多会更新jwt,需要判断jwt是否为“” 如果不为空,则需要更新用户的token Uid int64 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"` // contains filtered or unexported fields }
func (*CheckTokenResp) Descriptor
deprecated
func (*CheckTokenResp) Descriptor() ([]byte, []int)
Deprecated: Use CheckTokenResp.ProtoReflect.Descriptor instead.
func (*CheckTokenResp) GetToken ¶
func (x *CheckTokenResp) GetToken() string
func (*CheckTokenResp) GetUid ¶
func (x *CheckTokenResp) GetUid() int64
func (*CheckTokenResp) ProtoMessage ¶
func (*CheckTokenResp) ProtoMessage()
func (*CheckTokenResp) ProtoReflect ¶
func (x *CheckTokenResp) ProtoReflect() protoreflect.Message
func (*CheckTokenResp) Reset ¶
func (x *CheckTokenResp) Reset()
func (*CheckTokenResp) String ¶
func (x *CheckTokenResp) String() string
type GetUserInfoReq ¶
type GetUserInfoReq struct { Uid []int64 `protobuf:"varint,1,rep,packed,name=uid,proto3" json:"uid,omitempty"` //用户id // contains filtered or unexported fields }
func (*GetUserInfoReq) Descriptor
deprecated
func (*GetUserInfoReq) Descriptor() ([]byte, []int)
Deprecated: Use GetUserInfoReq.ProtoReflect.Descriptor instead.
func (*GetUserInfoReq) GetUid ¶
func (x *GetUserInfoReq) GetUid() []int64
func (*GetUserInfoReq) ProtoMessage ¶
func (*GetUserInfoReq) ProtoMessage()
func (*GetUserInfoReq) ProtoReflect ¶
func (x *GetUserInfoReq) ProtoReflect() protoreflect.Message
func (*GetUserInfoReq) Reset ¶
func (x *GetUserInfoReq) Reset()
func (*GetUserInfoReq) String ¶
func (x *GetUserInfoReq) String() string
type GetUserInfoResp ¶
type GetUserInfoResp struct { Info []*UserInfo `protobuf:"bytes,1,rep,name=info,proto3" json:"info,omitempty"` // contains filtered or unexported fields }
func (*GetUserInfoResp) Descriptor
deprecated
func (*GetUserInfoResp) Descriptor() ([]byte, []int)
Deprecated: Use GetUserInfoResp.ProtoReflect.Descriptor instead.
func (*GetUserInfoResp) GetInfo ¶
func (x *GetUserInfoResp) GetInfo() []*UserInfo
func (*GetUserInfoResp) ProtoMessage ¶
func (*GetUserInfoResp) ProtoMessage()
func (*GetUserInfoResp) ProtoReflect ¶
func (x *GetUserInfoResp) ProtoReflect() protoreflect.Message
func (*GetUserInfoResp) Reset ¶
func (x *GetUserInfoResp) Reset()
func (*GetUserInfoResp) String ¶
func (x *GetUserInfoResp) String() string
type JwtToken ¶
type JwtToken struct { AccessToken string `protobuf:"bytes,1,opt,name=accessToken,proto3" json:"accessToken,omitempty"` AccessExpire int64 `protobuf:"varint,2,opt,name=accessExpire,proto3" json:"accessExpire,omitempty"` RefreshAfter int64 `protobuf:"varint,3,opt,name=refreshAfter,proto3" json:"refreshAfter,omitempty"` // contains filtered or unexported fields }
func (*JwtToken) Descriptor
deprecated
func (*JwtToken) GetAccessExpire ¶
func (*JwtToken) GetAccessToken ¶
func (*JwtToken) GetRefreshAfter ¶
func (*JwtToken) ProtoMessage ¶
func (*JwtToken) ProtoMessage()
func (*JwtToken) ProtoReflect ¶
func (x *JwtToken) ProtoReflect() protoreflect.Message
type LoginReq ¶
type LoginReq struct { UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` //登录账号(支持用户名,手机号登录) 账号密码登录时需要填写 PwdType int32 `protobuf:"varint,2,opt,name=pwdType,proto3" json:"pwdType,omitempty"` //账号密码登录时需要填写.0,无密码 1,明文 2,md5加密 Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` //密码,建议md5转换 密码登录时需要填写 LoginType string `protobuf:"bytes,4,opt,name=loginType,proto3" json:"loginType,omitempty"` //验证类型 sms 短信验证码 img 图形验证码加账号密码登录 wxopen 微信开放平台登录 wxin 微信内登录 wxmini 微信小程序 Code string `protobuf:"bytes,5,opt,name=code,proto3" json:"code,omitempty"` //验证码 微信登录填code CodeID string `protobuf:"bytes,6,opt,name=codeID,proto3" json:"codeID,omitempty"` //验证码编号 微信登录填state // contains filtered or unexported fields }
func (*LoginReq) Descriptor
deprecated
func (*LoginReq) GetLoginType ¶
func (*LoginReq) GetPassword ¶
func (*LoginReq) GetPwdType ¶
func (*LoginReq) ProtoMessage ¶
func (*LoginReq) ProtoMessage()
func (*LoginReq) ProtoReflect ¶
func (x *LoginReq) ProtoReflect() protoreflect.Message
type LoginResp ¶
type LoginResp struct { Info *UserInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` Token *JwtToken `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*LoginResp) Descriptor
deprecated
func (*LoginResp) ProtoMessage ¶
func (*LoginResp) ProtoMessage()
func (*LoginResp) ProtoReflect ¶
func (x *LoginResp) ProtoReflect() protoreflect.Message
type ModifyUserInfoReq ¶
type ModifyUserInfoReq struct { Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` //修改的用户id Info map[string]string `` //修改的属性,参看UserInfo /* 149-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ModifyUserInfoReq) Descriptor
deprecated
func (*ModifyUserInfoReq) Descriptor() ([]byte, []int)
Deprecated: Use ModifyUserInfoReq.ProtoReflect.Descriptor instead.
func (*ModifyUserInfoReq) GetInfo ¶
func (x *ModifyUserInfoReq) GetInfo() map[string]string
func (*ModifyUserInfoReq) GetUid ¶
func (x *ModifyUserInfoReq) GetUid() int64
func (*ModifyUserInfoReq) ProtoMessage ¶
func (*ModifyUserInfoReq) ProtoMessage()
func (*ModifyUserInfoReq) ProtoReflect ¶
func (x *ModifyUserInfoReq) ProtoReflect() protoreflect.Message
func (*ModifyUserInfoReq) Reset ¶
func (x *ModifyUserInfoReq) Reset()
func (*ModifyUserInfoReq) String ¶
func (x *ModifyUserInfoReq) String() string
type NilResp ¶
type NilResp struct {
// contains filtered or unexported fields
}
func (*NilResp) Descriptor
deprecated
func (*NilResp) ProtoMessage ¶
func (*NilResp) ProtoMessage()
func (*NilResp) ProtoReflect ¶
func (x *NilResp) ProtoReflect() protoreflect.Message
type Register2Req ¶
type Register2Req struct { Info *UserInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*Register2Req) Descriptor
deprecated
func (*Register2Req) Descriptor() ([]byte, []int)
Deprecated: Use Register2Req.ProtoReflect.Descriptor instead.
func (*Register2Req) GetInfo ¶
func (x *Register2Req) GetInfo() *UserInfo
func (*Register2Req) GetPassword ¶
func (x *Register2Req) GetPassword() string
func (*Register2Req) ProtoMessage ¶
func (*Register2Req) ProtoMessage()
func (*Register2Req) ProtoReflect ¶
func (x *Register2Req) ProtoReflect() protoreflect.Message
func (*Register2Req) Reset ¶
func (x *Register2Req) Reset()
func (*Register2Req) String ¶
func (x *Register2Req) String() string
type Register2Resp ¶
type Register2Resp struct {
// contains filtered or unexported fields
}
func (*Register2Resp) Descriptor
deprecated
func (*Register2Resp) Descriptor() ([]byte, []int)
Deprecated: Use Register2Resp.ProtoReflect.Descriptor instead.
func (*Register2Resp) ProtoMessage ¶
func (*Register2Resp) ProtoMessage()
func (*Register2Resp) ProtoReflect ¶
func (x *Register2Resp) ProtoReflect() protoreflect.Message
func (*Register2Resp) Reset ¶
func (x *Register2Resp) Reset()
func (*Register2Resp) String ¶
func (x *Register2Resp) String() string
type RegisterCoreReq ¶
type RegisterCoreReq struct { ReqType string `protobuf:"bytes,1,opt,name=reqType,proto3" json:"reqType,omitempty"` //注册方式: 0:手机号注册 1:微信注册 Note string `protobuf:"bytes,2,opt,name=note,proto3" json:"note,omitempty"` //手机号注册时填写手机号 Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` //验证码 微信登录填code CodeID string `protobuf:"bytes,4,opt,name=codeID,proto3" json:"codeID,omitempty"` //验证码编号 微信登录填state // contains filtered or unexported fields }
func (*RegisterCoreReq) Descriptor
deprecated
func (*RegisterCoreReq) Descriptor() ([]byte, []int)
Deprecated: Use RegisterCoreReq.ProtoReflect.Descriptor instead.
func (*RegisterCoreReq) GetCode ¶
func (x *RegisterCoreReq) GetCode() string
func (*RegisterCoreReq) GetCodeID ¶
func (x *RegisterCoreReq) GetCodeID() string
func (*RegisterCoreReq) GetNote ¶
func (x *RegisterCoreReq) GetNote() string
func (*RegisterCoreReq) GetReqType ¶
func (x *RegisterCoreReq) GetReqType() string
func (*RegisterCoreReq) ProtoMessage ¶
func (*RegisterCoreReq) ProtoMessage()
func (*RegisterCoreReq) ProtoReflect ¶
func (x *RegisterCoreReq) ProtoReflect() protoreflect.Message
func (*RegisterCoreReq) Reset ¶
func (x *RegisterCoreReq) Reset()
func (*RegisterCoreReq) String ¶
func (x *RegisterCoreReq) String() string
type RegisterCoreResp ¶
type RegisterCoreResp struct { Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` //用户id // contains filtered or unexported fields }
func (*RegisterCoreResp) Descriptor
deprecated
func (*RegisterCoreResp) Descriptor() ([]byte, []int)
Deprecated: Use RegisterCoreResp.ProtoReflect.Descriptor instead.
func (*RegisterCoreResp) GetUid ¶
func (x *RegisterCoreResp) GetUid() int64
func (*RegisterCoreResp) ProtoMessage ¶
func (*RegisterCoreResp) ProtoMessage()
func (*RegisterCoreResp) ProtoReflect ¶
func (x *RegisterCoreResp) ProtoReflect() protoreflect.Message
func (*RegisterCoreResp) Reset ¶
func (x *RegisterCoreResp) Reset()
func (*RegisterCoreResp) String ¶
func (x *RegisterCoreResp) String() string
type UnimplementedUserServer ¶
type UnimplementedUserServer struct { }
UnimplementedUserServer can be embedded to have forward compatible implementations.
func (*UnimplementedUserServer) CheckToken ¶
func (*UnimplementedUserServer) CheckToken(context.Context, *CheckTokenReq) (*CheckTokenResp, error)
func (*UnimplementedUserServer) GetUserInfo ¶
func (*UnimplementedUserServer) GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error)
func (*UnimplementedUserServer) ModifyUserInfo ¶
func (*UnimplementedUserServer) ModifyUserInfo(context.Context, *ModifyUserInfoReq) (*NilResp, error)
func (*UnimplementedUserServer) Register2 ¶
func (*UnimplementedUserServer) Register2(context.Context, *Register2Req) (*Register2Resp, error)
func (*UnimplementedUserServer) RegisterCore ¶
func (*UnimplementedUserServer) RegisterCore(context.Context, *RegisterCoreReq) (*RegisterCoreResp, error)
type UserClient ¶
type UserClient interface { Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error) RegisterCore(ctx context.Context, in *RegisterCoreReq, opts ...grpc.CallOption) (*RegisterCoreResp, error) Register2(ctx context.Context, in *Register2Req, opts ...grpc.CallOption) (*Register2Resp, error) GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error) CheckToken(ctx context.Context, in *CheckTokenReq, opts ...grpc.CallOption) (*CheckTokenResp, error) ModifyUserInfo(ctx context.Context, in *ModifyUserInfoReq, opts ...grpc.CallOption) (*NilResp, error) }
UserClient is the client API for User service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUserClient ¶
func NewUserClient(cc grpc.ClientConnInterface) UserClient
type UserInfo ¶
type UserInfo struct { Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"` NickName string `protobuf:"bytes,3,opt,name=nickName,proto3" json:"nickName,omitempty"` InviterUid int64 `protobuf:"varint,4,opt,name=inviterUid,proto3" json:"inviterUid,omitempty"` InviterId string `protobuf:"bytes,5,opt,name=inviterId,proto3" json:"inviterId,omitempty"` Sex int64 `protobuf:"varint,6,opt,name=sex,proto3" json:"sex,omitempty"` City string `protobuf:"bytes,7,opt,name=city,proto3" json:"city,omitempty"` Country string `protobuf:"bytes,8,opt,name=country,proto3" json:"country,omitempty"` Province string `protobuf:"bytes,9,opt,name=province,proto3" json:"province,omitempty"` Language string `protobuf:"bytes,10,opt,name=language,proto3" json:"language,omitempty"` HeadImgUrl string `protobuf:"bytes,11,opt,name=headImgUrl,proto3" json:"headImgUrl,omitempty"` CreateTime int64 `protobuf:"varint,12,opt,name=createTime,proto3" json:"createTime,omitempty"` // contains filtered or unexported fields }
func (*UserInfo) Descriptor
deprecated
func (*UserInfo) GetCountry ¶
func (*UserInfo) GetCreateTime ¶
func (*UserInfo) GetHeadImgUrl ¶
func (*UserInfo) GetInviterId ¶
func (*UserInfo) GetInviterUid ¶
func (*UserInfo) GetLanguage ¶
func (*UserInfo) GetNickName ¶
func (*UserInfo) GetProvince ¶
func (*UserInfo) GetUserName ¶
func (*UserInfo) ProtoMessage ¶
func (*UserInfo) ProtoMessage()
func (*UserInfo) ProtoReflect ¶
func (x *UserInfo) ProtoReflect() protoreflect.Message
type UserServer ¶
type UserServer interface { Login(context.Context, *LoginReq) (*LoginResp, error) RegisterCore(context.Context, *RegisterCoreReq) (*RegisterCoreResp, error) Register2(context.Context, *Register2Req) (*Register2Resp, error) GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error) CheckToken(context.Context, *CheckTokenReq) (*CheckTokenResp, error) ModifyUserInfo(context.Context, *ModifyUserInfoReq) (*NilResp, error) }
UserServer is the server API for User service.