Documentation ¶
Index ¶
- Variables
- func RegisterUsersServer(s *grpc.Server, srv UsersServer)
- type GetReply
- func (*GetReply) Descriptor() ([]byte, []int)deprecated
- func (x *GetReply) GetEmail() string
- func (x *GetReply) GetPhone() string
- func (x *GetReply) GetStatus() GetReply_ReplyType
- func (x *GetReply) GetUsername() string
- func (*GetReply) ProtoMessage()
- func (x *GetReply) ProtoReflect() protoreflect.Message
- func (x *GetReply) Reset()
- func (x *GetReply) String() string
- type GetReply_ReplyType
- func (GetReply_ReplyType) Descriptor() protoreflect.EnumDescriptor
- func (x GetReply_ReplyType) Enum() *GetReply_ReplyType
- func (GetReply_ReplyType) EnumDescriptor() ([]byte, []int)deprecated
- func (x GetReply_ReplyType) Number() protoreflect.EnumNumber
- func (x GetReply_ReplyType) String() string
- func (GetReply_ReplyType) Type() protoreflect.EnumType
- type GetRequest
- type LoginReply
- func (*LoginReply) Descriptor() ([]byte, []int)deprecated
- func (x *LoginReply) GetStatus() LoginReply_ReplyType
- func (x *LoginReply) GetToken() string
- func (*LoginReply) ProtoMessage()
- func (x *LoginReply) ProtoReflect() protoreflect.Message
- func (x *LoginReply) Reset()
- func (x *LoginReply) String() string
- type LoginReply_ReplyType
- func (LoginReply_ReplyType) Descriptor() protoreflect.EnumDescriptor
- func (x LoginReply_ReplyType) Enum() *LoginReply_ReplyType
- func (LoginReply_ReplyType) EnumDescriptor() ([]byte, []int)deprecated
- func (x LoginReply_ReplyType) Number() protoreflect.EnumNumber
- func (x LoginReply_ReplyType) String() string
- func (LoginReply_ReplyType) Type() protoreflect.EnumType
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetPassword() string
- func (x *LoginRequest) GetUsername() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- type RegisterReply
- func (*RegisterReply) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterReply) GetStatus() RegisterReply_ReplyType
- func (x *RegisterReply) GetToken() string
- func (*RegisterReply) ProtoMessage()
- func (x *RegisterReply) ProtoReflect() protoreflect.Message
- func (x *RegisterReply) Reset()
- func (x *RegisterReply) String() string
- type RegisterReply_ReplyType
- func (RegisterReply_ReplyType) Descriptor() protoreflect.EnumDescriptor
- func (x RegisterReply_ReplyType) Enum() *RegisterReply_ReplyType
- func (RegisterReply_ReplyType) EnumDescriptor() ([]byte, []int)deprecated
- func (x RegisterReply_ReplyType) Number() protoreflect.EnumNumber
- func (x RegisterReply_ReplyType) String() string
- func (RegisterReply_ReplyType) Type() protoreflect.EnumType
- type RegisterRequest
- func (*RegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterRequest) GetEmail() string
- func (x *RegisterRequest) GetPassword() string
- func (x *RegisterRequest) GetPhone() string
- func (x *RegisterRequest) GetUsername() string
- func (*RegisterRequest) ProtoMessage()
- func (x *RegisterRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterRequest) Reset()
- func (x *RegisterRequest) String() string
- type UnimplementedUsersServer
- type UsersClient
- type UsersServer
Constants ¶
This section is empty.
Variables ¶
var ( LoginReply_ReplyType_name = map[int32]string{ 0: "Success", 1: "Fail", } LoginReply_ReplyType_value = map[string]int32{ "Success": 0, "Fail": 1, } )
Enum value maps for LoginReply_ReplyType.
var ( RegisterReply_ReplyType_name = map[int32]string{ 0: "Success", 1: "Fail", } RegisterReply_ReplyType_value = map[string]int32{ "Success": 0, "Fail": 1, } )
Enum value maps for RegisterReply_ReplyType.
var ( GetReply_ReplyType_name = map[int32]string{ 0: "Success", 1: "Fail", } GetReply_ReplyType_value = map[string]int32{ "Success": 0, "Fail": 1, } )
Enum value maps for GetReply_ReplyType.
var File_users_proto protoreflect.FileDescriptor
Functions ¶
func RegisterUsersServer ¶
func RegisterUsersServer(s *grpc.Server, srv UsersServer)
Types ¶
type GetReply ¶
type GetReply struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Phone string `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Status GetReply_ReplyType `protobuf:"varint,4,opt,name=status,proto3,enum=pb.GetReply_ReplyType" json:"status,omitempty"` // contains filtered or unexported fields }
func (*GetReply) Descriptor
deprecated
func (*GetReply) GetStatus ¶
func (x *GetReply) GetStatus() GetReply_ReplyType
func (*GetReply) GetUsername ¶
func (*GetReply) ProtoMessage ¶
func (*GetReply) ProtoMessage()
func (*GetReply) ProtoReflect ¶
func (x *GetReply) ProtoReflect() protoreflect.Message
type GetReply_ReplyType ¶
type GetReply_ReplyType int32
const ( GetReply_Success GetReply_ReplyType = 0 GetReply_Fail GetReply_ReplyType = 1 )
func (GetReply_ReplyType) Descriptor ¶
func (GetReply_ReplyType) Descriptor() protoreflect.EnumDescriptor
func (GetReply_ReplyType) Enum ¶
func (x GetReply_ReplyType) Enum() *GetReply_ReplyType
func (GetReply_ReplyType) EnumDescriptor
deprecated
func (GetReply_ReplyType) EnumDescriptor() ([]byte, []int)
Deprecated: Use GetReply_ReplyType.Descriptor instead.
func (GetReply_ReplyType) Number ¶
func (x GetReply_ReplyType) Number() protoreflect.EnumNumber
func (GetReply_ReplyType) String ¶
func (x GetReply_ReplyType) String() string
func (GetReply_ReplyType) Type ¶
func (GetReply_ReplyType) Type() protoreflect.EnumType
type GetRequest ¶
type GetRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetId ¶
func (x *GetRequest) GetId() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type LoginReply ¶
type LoginReply struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` Status LoginReply_ReplyType `protobuf:"varint,2,opt,name=status,proto3,enum=pb.LoginReply_ReplyType" json:"status,omitempty"` // contains filtered or unexported fields }
func (*LoginReply) Descriptor
deprecated
func (*LoginReply) Descriptor() ([]byte, []int)
Deprecated: Use LoginReply.ProtoReflect.Descriptor instead.
func (*LoginReply) GetStatus ¶
func (x *LoginReply) GetStatus() LoginReply_ReplyType
func (*LoginReply) GetToken ¶
func (x *LoginReply) GetToken() string
func (*LoginReply) ProtoMessage ¶
func (*LoginReply) ProtoMessage()
func (*LoginReply) ProtoReflect ¶
func (x *LoginReply) ProtoReflect() protoreflect.Message
func (*LoginReply) Reset ¶
func (x *LoginReply) Reset()
func (*LoginReply) String ¶
func (x *LoginReply) String() string
type LoginReply_ReplyType ¶
type LoginReply_ReplyType int32
const ( LoginReply_Success LoginReply_ReplyType = 0 LoginReply_Fail LoginReply_ReplyType = 1 )
func (LoginReply_ReplyType) Descriptor ¶
func (LoginReply_ReplyType) Descriptor() protoreflect.EnumDescriptor
func (LoginReply_ReplyType) Enum ¶
func (x LoginReply_ReplyType) Enum() *LoginReply_ReplyType
func (LoginReply_ReplyType) EnumDescriptor
deprecated
func (LoginReply_ReplyType) EnumDescriptor() ([]byte, []int)
Deprecated: Use LoginReply_ReplyType.Descriptor instead.
func (LoginReply_ReplyType) Number ¶
func (x LoginReply_ReplyType) Number() protoreflect.EnumNumber
func (LoginReply_ReplyType) String ¶
func (x LoginReply_ReplyType) String() string
func (LoginReply_ReplyType) Type ¶
func (LoginReply_ReplyType) Type() protoreflect.EnumType
type LoginRequest ¶
type LoginRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*LoginRequest) Descriptor
deprecated
func (*LoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) GetPassword ¶
func (x *LoginRequest) GetPassword() string
func (*LoginRequest) GetUsername ¶
func (x *LoginRequest) GetUsername() 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 RegisterReply ¶
type RegisterReply struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` Status RegisterReply_ReplyType `protobuf:"varint,2,opt,name=status,proto3,enum=pb.RegisterReply_ReplyType" json:"status,omitempty"` // contains filtered or unexported fields }
func (*RegisterReply) Descriptor
deprecated
func (*RegisterReply) Descriptor() ([]byte, []int)
Deprecated: Use RegisterReply.ProtoReflect.Descriptor instead.
func (*RegisterReply) GetStatus ¶
func (x *RegisterReply) GetStatus() RegisterReply_ReplyType
func (*RegisterReply) GetToken ¶
func (x *RegisterReply) GetToken() string
func (*RegisterReply) ProtoMessage ¶
func (*RegisterReply) ProtoMessage()
func (*RegisterReply) ProtoReflect ¶
func (x *RegisterReply) ProtoReflect() protoreflect.Message
func (*RegisterReply) Reset ¶
func (x *RegisterReply) Reset()
func (*RegisterReply) String ¶
func (x *RegisterReply) String() string
type RegisterReply_ReplyType ¶
type RegisterReply_ReplyType int32
const ( RegisterReply_Success RegisterReply_ReplyType = 0 RegisterReply_Fail RegisterReply_ReplyType = 1 )
func (RegisterReply_ReplyType) Descriptor ¶
func (RegisterReply_ReplyType) Descriptor() protoreflect.EnumDescriptor
func (RegisterReply_ReplyType) Enum ¶
func (x RegisterReply_ReplyType) Enum() *RegisterReply_ReplyType
func (RegisterReply_ReplyType) EnumDescriptor
deprecated
func (RegisterReply_ReplyType) EnumDescriptor() ([]byte, []int)
Deprecated: Use RegisterReply_ReplyType.Descriptor instead.
func (RegisterReply_ReplyType) Number ¶
func (x RegisterReply_ReplyType) Number() protoreflect.EnumNumber
func (RegisterReply_ReplyType) String ¶
func (x RegisterReply_ReplyType) String() string
func (RegisterReply_ReplyType) Type ¶
func (RegisterReply_ReplyType) Type() protoreflect.EnumType
type RegisterRequest ¶
type RegisterRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` Phone string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"` Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*RegisterRequest) Descriptor
deprecated
func (*RegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) GetEmail ¶
func (x *RegisterRequest) GetEmail() string
func (*RegisterRequest) GetPassword ¶
func (x *RegisterRequest) GetPassword() string
func (*RegisterRequest) GetPhone ¶
func (x *RegisterRequest) GetPhone() string
func (*RegisterRequest) GetUsername ¶
func (x *RegisterRequest) GetUsername() string
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
type UnimplementedUsersServer ¶
type UnimplementedUsersServer struct { }
UnimplementedUsersServer can be embedded to have forward compatible implementations.
func (*UnimplementedUsersServer) Get ¶
func (*UnimplementedUsersServer) Get(context.Context, *GetRequest) (*GetReply, error)
func (*UnimplementedUsersServer) Login ¶
func (*UnimplementedUsersServer) Login(context.Context, *LoginRequest) (*LoginReply, error)
func (*UnimplementedUsersServer) Register ¶
func (*UnimplementedUsersServer) Register(context.Context, *RegisterRequest) (*RegisterReply, error)
type UsersClient ¶
type UsersClient interface { Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error) Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterReply, error) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetReply, error) }
UsersClient is the client API for Users service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUsersClient ¶
func NewUsersClient(cc grpc.ClientConnInterface) UsersClient
type UsersServer ¶
type UsersServer interface { Login(context.Context, *LoginRequest) (*LoginReply, error) Register(context.Context, *RegisterRequest) (*RegisterReply, error) Get(context.Context, *GetRequest) (*GetReply, error) }
UsersServer is the server API for Users service.