Documentation
¶
Index ¶
- func RegisterUserServer(s *grpc.Server, srv UserServer)
- type GetRequest
- func (*GetRequest) Descriptor() ([]byte, []int)
- func (m *GetRequest) GetId() int64
- func (*GetRequest) ProtoMessage()
- func (m *GetRequest) Reset()
- func (m *GetRequest) String() string
- func (m *GetRequest) XXX_DiscardUnknown()
- func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetRequest) XXX_Merge(src proto.Message)
- func (m *GetRequest) XXX_Size() int
- func (m *GetRequest) XXX_Unmarshal(b []byte) error
- type UnimplementedUserServer
- type UserClient
- type UserInfo
- func (*UserInfo) Descriptor() ([]byte, []int)
- func (m *UserInfo) GetEmail() string
- func (m *UserInfo) GetId() int64
- func (m *UserInfo) GetName() string
- func (m *UserInfo) GetStatus() bool
- func (*UserInfo) ProtoMessage()
- func (m *UserInfo) Reset()
- func (m *UserInfo) String() string
- func (m *UserInfo) XXX_DiscardUnknown()
- func (m *UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UserInfo) XXX_Merge(src proto.Message)
- func (m *UserInfo) XXX_Size() int
- func (m *UserInfo) XXX_Unmarshal(b []byte) error
- type UserServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterUserServer ¶
func RegisterUserServer(s *grpc.Server, srv UserServer)
Types ¶
type GetRequest ¶
type GetRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetRequest) Descriptor ¶
func (*GetRequest) Descriptor() ([]byte, []int)
func (*GetRequest) GetId ¶
func (m *GetRequest) GetId() int64
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) Reset ¶
func (m *GetRequest) Reset()
func (*GetRequest) String ¶
func (m *GetRequest) String() string
func (*GetRequest) XXX_DiscardUnknown ¶
func (m *GetRequest) XXX_DiscardUnknown()
func (*GetRequest) XXX_Marshal ¶
func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetRequest) XXX_Merge ¶
func (m *GetRequest) XXX_Merge(src proto.Message)
func (*GetRequest) XXX_Size ¶
func (m *GetRequest) XXX_Size() int
func (*GetRequest) XXX_Unmarshal ¶
func (m *GetRequest) XXX_Unmarshal(b []byte) error
type UnimplementedUserServer ¶
type UnimplementedUserServer struct { }
UnimplementedUserServer can be embedded to have forward compatible implementations.
func (*UnimplementedUserServer) Login ¶
func (*UnimplementedUserServer) Login(ctx context.Context, req *GetRequest) (*UserInfo, error)
type UserClient ¶
type UserClient interface { // 用户注册 Create(ctx context.Context, in *UserInfo, opts ...grpc.CallOption) (*UserInfo, error) // 用户登录 Login(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*UserInfo, 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.ClientConn) UserClient
type UserInfo ¶
type UserInfo struct { // 用户 id Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 用户名称 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 用户邮箱 Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` // 用户状态 Status bool `protobuf:"varint,4,opt,name=status,proto3" json:"status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
用户信息
func (*UserInfo) Descriptor ¶
func (*UserInfo) ProtoMessage ¶
func (*UserInfo) ProtoMessage()
func (*UserInfo) XXX_DiscardUnknown ¶
func (m *UserInfo) XXX_DiscardUnknown()
func (*UserInfo) XXX_Marshal ¶
func (*UserInfo) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.