Documentation ¶
Index ¶
- func RegisterUserServiceHandler(s server.Server, hdlr UserServiceHandler, opts ...server.HandlerOption) error
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)
- func (m *LoginRequest) GetEmail() string
- func (m *LoginRequest) GetPassword() string
- func (*LoginRequest) ProtoMessage()
- func (m *LoginRequest) Reset()
- func (m *LoginRequest) String() string
- func (m *LoginRequest) XXX_DiscardUnknown()
- func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LoginRequest) XXX_Merge(src proto.Message)
- func (m *LoginRequest) XXX_Size() int
- func (m *LoginRequest) XXX_Unmarshal(b []byte) error
- type RegisterRequest
- func (*RegisterRequest) Descriptor() ([]byte, []int)
- func (m *RegisterRequest) GetUser() *User
- func (*RegisterRequest) ProtoMessage()
- func (m *RegisterRequest) Reset()
- func (m *RegisterRequest) String() string
- func (m *RegisterRequest) XXX_DiscardUnknown()
- func (m *RegisterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RegisterRequest) XXX_Merge(src proto.Message)
- func (m *RegisterRequest) XXX_Size() int
- func (m *RegisterRequest) XXX_Unmarshal(b []byte) error
- type Response
- func (*Response) Descriptor() ([]byte, []int)
- func (m *Response) GetCode() string
- func (m *Response) GetMsg() string
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) String() string
- func (m *Response) XXX_DiscardUnknown()
- func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Response) XXX_Merge(src proto.Message)
- func (m *Response) XXX_Size() int
- func (m *Response) XXX_Unmarshal(b []byte) error
- type TestRequest
- func (*TestRequest) Descriptor() ([]byte, []int)
- func (m *TestRequest) GetUid() uint32
- func (*TestRequest) ProtoMessage()
- func (m *TestRequest) Reset()
- func (m *TestRequest) String() string
- func (m *TestRequest) XXX_DiscardUnknown()
- func (m *TestRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TestRequest) XXX_Merge(src proto.Message)
- func (m *TestRequest) XXX_Size() int
- func (m *TestRequest) XXX_Unmarshal(b []byte) error
- type UpdatePasswordRequest
- func (*UpdatePasswordRequest) Descriptor() ([]byte, []int)
- func (m *UpdatePasswordRequest) GetConfirmPassword() string
- func (m *UpdatePasswordRequest) GetNewPassword() string
- func (m *UpdatePasswordRequest) GetOldPassword() string
- func (m *UpdatePasswordRequest) GetUid() uint32
- func (*UpdatePasswordRequest) ProtoMessage()
- func (m *UpdatePasswordRequest) Reset()
- func (m *UpdatePasswordRequest) String() string
- func (m *UpdatePasswordRequest) XXX_DiscardUnknown()
- func (m *UpdatePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UpdatePasswordRequest) XXX_Merge(src proto.Message)
- func (m *UpdatePasswordRequest) XXX_Size() int
- func (m *UpdatePasswordRequest) XXX_Unmarshal(b []byte) error
- type User
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetEmail() string
- func (m *User) GetId() uint32
- func (m *User) GetName() string
- func (m *User) GetPassword() string
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) String() string
- func (m *User) XXX_DiscardUnknown()
- func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *User) XXX_Merge(src proto.Message)
- func (m *User) XXX_Size() int
- func (m *User) XXX_Unmarshal(b []byte) error
- type UserService
- type UserServiceHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterUserServiceHandler ¶
func RegisterUserServiceHandler(s server.Server, hdlr UserServiceHandler, opts ...server.HandlerOption) error
Types ¶
type LoginRequest ¶
type LoginRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
登錄
func (*LoginRequest) Descriptor ¶
func (*LoginRequest) Descriptor() ([]byte, []int)
func (*LoginRequest) GetEmail ¶
func (m *LoginRequest) GetEmail() string
func (*LoginRequest) GetPassword ¶
func (m *LoginRequest) GetPassword() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) Reset ¶
func (m *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (m *LoginRequest) String() string
func (*LoginRequest) XXX_DiscardUnknown ¶
func (m *LoginRequest) XXX_DiscardUnknown()
func (*LoginRequest) XXX_Marshal ¶
func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LoginRequest) XXX_Merge ¶
func (m *LoginRequest) XXX_Merge(src proto.Message)
func (*LoginRequest) XXX_Size ¶
func (m *LoginRequest) XXX_Size() int
func (*LoginRequest) XXX_Unmarshal ¶
func (m *LoginRequest) XXX_Unmarshal(b []byte) error
type RegisterRequest ¶
type RegisterRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
注册
func (*RegisterRequest) Descriptor ¶
func (*RegisterRequest) Descriptor() ([]byte, []int)
func (*RegisterRequest) GetUser ¶
func (m *RegisterRequest) GetUser() *User
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) Reset ¶
func (m *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (m *RegisterRequest) String() string
func (*RegisterRequest) XXX_DiscardUnknown ¶
func (m *RegisterRequest) XXX_DiscardUnknown()
func (*RegisterRequest) XXX_Marshal ¶
func (m *RegisterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RegisterRequest) XXX_Merge ¶
func (m *RegisterRequest) XXX_Merge(src proto.Message)
func (*RegisterRequest) XXX_Size ¶
func (m *RegisterRequest) XXX_Size() int
func (*RegisterRequest) XXX_Unmarshal ¶
func (m *RegisterRequest) XXX_Unmarshal(b []byte) error
type Response ¶
type Response struct { Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Response) Descriptor ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) XXX_DiscardUnknown ¶
func (m *Response) XXX_DiscardUnknown()
func (*Response) XXX_Marshal ¶
func (*Response) XXX_Unmarshal ¶
type TestRequest ¶
type TestRequest struct { Uid uint32 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
测试服务之间调用
func (*TestRequest) Descriptor ¶
func (*TestRequest) Descriptor() ([]byte, []int)
func (*TestRequest) GetUid ¶
func (m *TestRequest) GetUid() uint32
func (*TestRequest) ProtoMessage ¶
func (*TestRequest) ProtoMessage()
func (*TestRequest) Reset ¶
func (m *TestRequest) Reset()
func (*TestRequest) String ¶
func (m *TestRequest) String() string
func (*TestRequest) XXX_DiscardUnknown ¶
func (m *TestRequest) XXX_DiscardUnknown()
func (*TestRequest) XXX_Marshal ¶
func (m *TestRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TestRequest) XXX_Merge ¶
func (m *TestRequest) XXX_Merge(src proto.Message)
func (*TestRequest) XXX_Size ¶
func (m *TestRequest) XXX_Size() int
func (*TestRequest) XXX_Unmarshal ¶
func (m *TestRequest) XXX_Unmarshal(b []byte) error
type UpdatePasswordRequest ¶
type UpdatePasswordRequest struct { Uid uint32 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` OldPassword string `protobuf:"bytes,2,opt,name=oldPassword,proto3" json:"oldPassword,omitempty"` NewPassword string `protobuf:"bytes,3,opt,name=newPassword,proto3" json:"newPassword,omitempty"` ConfirmPassword string `protobuf:"bytes,4,opt,name=confirmPassword,proto3" json:"confirmPassword,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
修改密碼
func (*UpdatePasswordRequest) Descriptor ¶
func (*UpdatePasswordRequest) Descriptor() ([]byte, []int)
func (*UpdatePasswordRequest) GetConfirmPassword ¶
func (m *UpdatePasswordRequest) GetConfirmPassword() string
func (*UpdatePasswordRequest) GetNewPassword ¶
func (m *UpdatePasswordRequest) GetNewPassword() string
func (*UpdatePasswordRequest) GetOldPassword ¶
func (m *UpdatePasswordRequest) GetOldPassword() string
func (*UpdatePasswordRequest) GetUid ¶
func (m *UpdatePasswordRequest) GetUid() uint32
func (*UpdatePasswordRequest) ProtoMessage ¶
func (*UpdatePasswordRequest) ProtoMessage()
func (*UpdatePasswordRequest) Reset ¶
func (m *UpdatePasswordRequest) Reset()
func (*UpdatePasswordRequest) String ¶
func (m *UpdatePasswordRequest) String() string
func (*UpdatePasswordRequest) XXX_DiscardUnknown ¶
func (m *UpdatePasswordRequest) XXX_DiscardUnknown()
func (*UpdatePasswordRequest) XXX_Marshal ¶
func (m *UpdatePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UpdatePasswordRequest) XXX_Merge ¶
func (m *UpdatePasswordRequest) XXX_Merge(src proto.Message)
func (*UpdatePasswordRequest) XXX_Size ¶
func (m *UpdatePasswordRequest) XXX_Size() int
func (*UpdatePasswordRequest) XXX_Unmarshal ¶
func (m *UpdatePasswordRequest) XXX_Unmarshal(b []byte) error
type User ¶
type User struct { Id uint32 `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"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
用户信息
func (*User) Descriptor ¶
func (*User) GetPassword ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) XXX_DiscardUnknown ¶
func (m *User) XXX_DiscardUnknown()
func (*User) XXX_Unmarshal ¶
type UserService ¶
type UserService interface { Register(ctx context.Context, in *RegisterRequest, opts ...client.CallOption) (*Response, error) Login(ctx context.Context, in *LoginRequest, opts ...client.CallOption) (*Response, error) UpdatePassword(ctx context.Context, in *UpdatePasswordRequest, opts ...client.CallOption) (*Response, error) Test(ctx context.Context, in *TestRequest, opts ...client.CallOption) (*Response, error) }
func NewUserService ¶
func NewUserService(name string, c client.Client) UserService
type UserServiceHandler ¶
type UserServiceHandler interface { Register(context.Context, *RegisterRequest, *Response) error Login(context.Context, *LoginRequest, *Response) error UpdatePassword(context.Context, *UpdatePasswordRequest, *Response) error Test(context.Context, *TestRequest, *Response) error }
Click to show internal directories.
Click to hide internal directories.