user

package
v0.0.0-...-592b0ac Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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) Descriptor() ([]byte, []int)

Deprecated: Use JwtToken.ProtoReflect.Descriptor instead.

func (*JwtToken) GetAccessExpire

func (x *JwtToken) GetAccessExpire() int64

func (*JwtToken) GetAccessToken

func (x *JwtToken) GetAccessToken() string

func (*JwtToken) GetRefreshAfter

func (x *JwtToken) GetRefreshAfter() int64

func (*JwtToken) ProtoMessage

func (*JwtToken) ProtoMessage()

func (*JwtToken) ProtoReflect

func (x *JwtToken) ProtoReflect() protoreflect.Message

func (*JwtToken) Reset

func (x *JwtToken) Reset()

func (*JwtToken) String

func (x *JwtToken) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use LoginReq.ProtoReflect.Descriptor instead.

func (*LoginReq) GetCode

func (x *LoginReq) GetCode() string

func (*LoginReq) GetCodeID

func (x *LoginReq) GetCodeID() string

func (*LoginReq) GetLoginType

func (x *LoginReq) GetLoginType() string

func (*LoginReq) GetPassword

func (x *LoginReq) GetPassword() string

func (*LoginReq) GetPwdType

func (x *LoginReq) GetPwdType() int32

func (*LoginReq) GetUserID

func (x *LoginReq) GetUserID() string

func (*LoginReq) ProtoMessage

func (*LoginReq) ProtoMessage()

func (*LoginReq) ProtoReflect

func (x *LoginReq) ProtoReflect() protoreflect.Message

func (*LoginReq) Reset

func (x *LoginReq) Reset()

func (*LoginReq) String

func (x *LoginReq) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use LoginResp.ProtoReflect.Descriptor instead.

func (*LoginResp) GetInfo

func (x *LoginResp) GetInfo() *UserInfo

func (*LoginResp) GetToken

func (x *LoginResp) GetToken() *JwtToken

func (*LoginResp) ProtoMessage

func (*LoginResp) ProtoMessage()

func (*LoginResp) ProtoReflect

func (x *LoginResp) ProtoReflect() protoreflect.Message

func (*LoginResp) Reset

func (x *LoginResp) Reset()

func (*LoginResp) String

func (x *LoginResp) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use NilResp.ProtoReflect.Descriptor instead.

func (*NilResp) ProtoMessage

func (*NilResp) ProtoMessage()

func (*NilResp) ProtoReflect

func (x *NilResp) ProtoReflect() protoreflect.Message

func (*NilResp) Reset

func (x *NilResp) Reset()

func (*NilResp) String

func (x *NilResp) String() string

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) GetUserInfo

func (*UnimplementedUserServer) Login

func (*UnimplementedUserServer) ModifyUserInfo

func (*UnimplementedUserServer) Register2

func (*UnimplementedUserServer) RegisterCore

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) Descriptor() ([]byte, []int)

Deprecated: Use UserInfo.ProtoReflect.Descriptor instead.

func (*UserInfo) GetCity

func (x *UserInfo) GetCity() string

func (*UserInfo) GetCountry

func (x *UserInfo) GetCountry() string

func (*UserInfo) GetCreateTime

func (x *UserInfo) GetCreateTime() int64

func (*UserInfo) GetHeadImgUrl

func (x *UserInfo) GetHeadImgUrl() string

func (*UserInfo) GetInviterId

func (x *UserInfo) GetInviterId() string

func (*UserInfo) GetInviterUid

func (x *UserInfo) GetInviterUid() int64

func (*UserInfo) GetLanguage

func (x *UserInfo) GetLanguage() string

func (*UserInfo) GetNickName

func (x *UserInfo) GetNickName() string

func (*UserInfo) GetProvince

func (x *UserInfo) GetProvince() string

func (*UserInfo) GetSex

func (x *UserInfo) GetSex() int64

func (*UserInfo) GetUid

func (x *UserInfo) GetUid() int64

func (*UserInfo) GetUserName

func (x *UserInfo) GetUserName() string

func (*UserInfo) ProtoMessage

func (*UserInfo) ProtoMessage()

func (*UserInfo) ProtoReflect

func (x *UserInfo) ProtoReflect() protoreflect.Message

func (*UserInfo) Reset

func (x *UserInfo) Reset()

func (*UserInfo) String

func (x *UserInfo) String() string

type UserServer

UserServer is the server API for User service.

Jump to

Keyboard shortcuts

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