Documentation ¶
Index ¶
- Variables
- func RegisterUserServer(s *grpc.Server, srv UserServer)
- type GetInfoRequest
- type GetInfoResponse
- func (*GetInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetInfoResponse) GetId() int32
- func (x *GetInfoResponse) GetPassword() string
- func (x *GetInfoResponse) GetPhone() string
- func (x *GetInfoResponse) GetPortrait() string
- func (x *GetInfoResponse) GetRegIp() string
- func (x *GetInfoResponse) GetStatus() string
- func (*GetInfoResponse) ProtoMessage()
- func (x *GetInfoResponse) ProtoReflect() protoreflect.Message
- func (x *GetInfoResponse) Reset()
- func (x *GetInfoResponse) String() string
- type LoginRequest
- type LoginResponse
- func (*LoginResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LoginResponse) GetId() int32
- func (x *LoginResponse) GetPassword() string
- func (x *LoginResponse) GetPhone() string
- func (x *LoginResponse) GetPortrait() string
- func (x *LoginResponse) GetRegIp() string
- func (x *LoginResponse) GetStatus() string
- func (*LoginResponse) ProtoMessage()
- func (x *LoginResponse) ProtoReflect() protoreflect.Message
- func (x *LoginResponse) Reset()
- func (x *LoginResponse) String() string
- type UnimplementedUserServer
- func (*UnimplementedUserServer) GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error)
- func (*UnimplementedUserServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
- func (*UnimplementedUserServer) UpdateInfo(context.Context, *UpdateInfoRequest) (*empty.Empty, error)
- func (*UnimplementedUserServer) UpdatePassword(context.Context, *UpdatePasswordRequest) (*empty.Empty, error)
- type UpdateInfoRequest
- func (*UpdateInfoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateInfoRequest) GetId() int32
- func (x *UpdateInfoRequest) GetPhone() string
- func (x *UpdateInfoRequest) GetPortrait() string
- func (*UpdateInfoRequest) ProtoMessage()
- func (x *UpdateInfoRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateInfoRequest) Reset()
- func (x *UpdateInfoRequest) String() string
- type UpdatePasswordRequest
- func (*UpdatePasswordRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdatePasswordRequest) GetId() int32
- func (x *UpdatePasswordRequest) GetNewPassword() string
- func (*UpdatePasswordRequest) ProtoMessage()
- func (x *UpdatePasswordRequest) ProtoReflect() protoreflect.Message
- func (x *UpdatePasswordRequest) Reset()
- func (x *UpdatePasswordRequest) String() string
- type UserClient
- 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 GetInfoRequest ¶
type GetInfoRequest struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetInfoRequest) Descriptor
deprecated
func (*GetInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetInfoRequest.ProtoReflect.Descriptor instead.
func (*GetInfoRequest) GetId ¶
func (x *GetInfoRequest) GetId() int32
func (*GetInfoRequest) ProtoMessage ¶
func (*GetInfoRequest) ProtoMessage()
func (*GetInfoRequest) ProtoReflect ¶
func (x *GetInfoRequest) ProtoReflect() protoreflect.Message
func (*GetInfoRequest) Reset ¶
func (x *GetInfoRequest) Reset()
func (*GetInfoRequest) String ¶
func (x *GetInfoRequest) String() string
type GetInfoResponse ¶
type GetInfoResponse struct { Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` Portrait string `protobuf:"bytes,2,opt,name=portrait,proto3" json:"portrait,omitempty"` Phone string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"` RegIp string `protobuf:"bytes,4,opt,name=reg_ip,json=regIp,proto3" json:"reg_ip,omitempty"` Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` Id int32 `protobuf:"varint,6,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetInfoResponse) Descriptor
deprecated
func (*GetInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetInfoResponse.ProtoReflect.Descriptor instead.
func (*GetInfoResponse) GetId ¶
func (x *GetInfoResponse) GetId() int32
func (*GetInfoResponse) GetPassword ¶
func (x *GetInfoResponse) GetPassword() string
func (*GetInfoResponse) GetPhone ¶
func (x *GetInfoResponse) GetPhone() string
func (*GetInfoResponse) GetPortrait ¶
func (x *GetInfoResponse) GetPortrait() string
func (*GetInfoResponse) GetRegIp ¶
func (x *GetInfoResponse) GetRegIp() string
func (*GetInfoResponse) GetStatus ¶
func (x *GetInfoResponse) GetStatus() string
func (*GetInfoResponse) ProtoMessage ¶
func (*GetInfoResponse) ProtoMessage()
func (*GetInfoResponse) ProtoReflect ¶
func (x *GetInfoResponse) ProtoReflect() protoreflect.Message
func (*GetInfoResponse) Reset ¶
func (x *GetInfoResponse) Reset()
func (*GetInfoResponse) String ¶
func (x *GetInfoResponse) String() string
type LoginRequest ¶
type LoginRequest struct { Phone string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"` // contains filtered or unexported fields }
func (*LoginRequest) Descriptor
deprecated
func (*LoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) GetPhone ¶
func (x *LoginRequest) GetPhone() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) ProtoReflect ¶
func (x *LoginRequest) ProtoReflect() protoreflect.Message
func (*LoginRequest) Reset ¶
func (x *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (x *LoginRequest) String() string
type LoginResponse ¶
type LoginResponse struct { Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` Portrait string `protobuf:"bytes,2,opt,name=portrait,proto3" json:"portrait,omitempty"` Phone string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"` RegIp string `protobuf:"bytes,4,opt,name=reg_ip,json=regIp,proto3" json:"reg_ip,omitempty"` Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` Id int32 `protobuf:"varint,6,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*LoginResponse) Descriptor
deprecated
func (*LoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.
func (*LoginResponse) GetId ¶
func (x *LoginResponse) GetId() int32
func (*LoginResponse) GetPassword ¶
func (x *LoginResponse) GetPassword() string
func (*LoginResponse) GetPhone ¶
func (x *LoginResponse) GetPhone() string
func (*LoginResponse) GetPortrait ¶
func (x *LoginResponse) GetPortrait() string
func (*LoginResponse) GetRegIp ¶
func (x *LoginResponse) GetRegIp() string
func (*LoginResponse) GetStatus ¶
func (x *LoginResponse) GetStatus() string
func (*LoginResponse) ProtoMessage ¶
func (*LoginResponse) ProtoMessage()
func (*LoginResponse) ProtoReflect ¶
func (x *LoginResponse) ProtoReflect() protoreflect.Message
func (*LoginResponse) Reset ¶
func (x *LoginResponse) Reset()
func (*LoginResponse) String ¶
func (x *LoginResponse) String() string
type UnimplementedUserServer ¶
type UnimplementedUserServer struct { }
UnimplementedUserServer can be embedded to have forward compatible implementations.
func (*UnimplementedUserServer) GetInfo ¶
func (*UnimplementedUserServer) GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error)
func (*UnimplementedUserServer) Login ¶
func (*UnimplementedUserServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
func (*UnimplementedUserServer) UpdateInfo ¶
func (*UnimplementedUserServer) UpdateInfo(context.Context, *UpdateInfoRequest) (*empty.Empty, error)
func (*UnimplementedUserServer) UpdatePassword ¶
func (*UnimplementedUserServer) UpdatePassword(context.Context, *UpdatePasswordRequest) (*empty.Empty, error)
type UpdateInfoRequest ¶
type UpdateInfoRequest struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Portrait string `protobuf:"bytes,2,opt,name=portrait,proto3" json:"portrait,omitempty"` Phone string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"` // contains filtered or unexported fields }
func (*UpdateInfoRequest) Descriptor
deprecated
func (*UpdateInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateInfoRequest.ProtoReflect.Descriptor instead.
func (*UpdateInfoRequest) GetId ¶
func (x *UpdateInfoRequest) GetId() int32
func (*UpdateInfoRequest) GetPhone ¶
func (x *UpdateInfoRequest) GetPhone() string
func (*UpdateInfoRequest) GetPortrait ¶
func (x *UpdateInfoRequest) GetPortrait() string
func (*UpdateInfoRequest) ProtoMessage ¶
func (*UpdateInfoRequest) ProtoMessage()
func (*UpdateInfoRequest) ProtoReflect ¶
func (x *UpdateInfoRequest) ProtoReflect() protoreflect.Message
func (*UpdateInfoRequest) Reset ¶
func (x *UpdateInfoRequest) Reset()
func (*UpdateInfoRequest) String ¶
func (x *UpdateInfoRequest) String() string
type UpdatePasswordRequest ¶
type UpdatePasswordRequest struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` NewPassword string `protobuf:"bytes,2,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"` // contains filtered or unexported fields }
func (*UpdatePasswordRequest) Descriptor
deprecated
func (*UpdatePasswordRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdatePasswordRequest.ProtoReflect.Descriptor instead.
func (*UpdatePasswordRequest) GetId ¶
func (x *UpdatePasswordRequest) GetId() int32
func (*UpdatePasswordRequest) GetNewPassword ¶
func (x *UpdatePasswordRequest) GetNewPassword() string
func (*UpdatePasswordRequest) ProtoMessage ¶
func (*UpdatePasswordRequest) ProtoMessage()
func (*UpdatePasswordRequest) ProtoReflect ¶
func (x *UpdatePasswordRequest) ProtoReflect() protoreflect.Message
func (*UpdatePasswordRequest) Reset ¶
func (x *UpdatePasswordRequest) Reset()
func (*UpdatePasswordRequest) String ¶
func (x *UpdatePasswordRequest) String() string
type UserClient ¶
type UserClient interface { // 用户登录 Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) // 用户信息 GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error) // 更新用户信息 UpdateInfo(ctx context.Context, in *UpdateInfoRequest, opts ...grpc.CallOption) (*empty.Empty, error) // 修改密码 UpdatePassword(ctx context.Context, in *UpdatePasswordRequest, opts ...grpc.CallOption) (*empty.Empty, 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 UserServer ¶
type UserServer interface { // 用户登录 Login(context.Context, *LoginRequest) (*LoginResponse, error) // 用户信息 GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error) // 更新用户信息 UpdateInfo(context.Context, *UpdateInfoRequest) (*empty.Empty, error) // 修改密码 UpdatePassword(context.Context, *UpdatePasswordRequest) (*empty.Empty, error) }
UserServer is the server API for User service.