Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthHandler ¶
type AuthHandler struct { pb.UnimplementedAuthServiceServer // contains filtered or unexported fields }
func NewAuthHandler ¶
func NewAuthHandler(opts AuthServerOptions) *AuthHandler
func (*AuthHandler) Login ¶
func (a *AuthHandler) Login(ctx context.Context, in *pb.Login_Request) (*pb.Login_Response, error)
type AuthServerOptions ¶
type AuthServerOptions struct { AuthService *middleware.AuthService UserService *service.UserService TokenHandler *middleware.TokenHandler }
type UserHandler ¶
type UserHandler struct { pb.UnimplementedUserServiceServer // contains filtered or unexported fields }
func NewUserHandler ¶
func NewUserHandler(opts *UserServerOpts) *UserHandler
func (*UserHandler) CreateUser ¶
func (u *UserHandler) CreateUser(ctx context.Context, in *pb.CreateUserRequest) (*pb.CreateUserResponse, error)
func (*UserHandler) GetUserInfo ¶
func (u *UserHandler) GetUserInfo(ctx context.Context, in *pb.GetUserInfoRequest) (*pb.GetUserInfoResponse, error)
func (*UserHandler) HashPassword ¶
func (u *UserHandler) HashPassword(password string) (string, error)
type UserServerOpts ¶
type UserServerOpts struct { UserService *service.UserService AuthService *middleware.AuthService }
Click to show internal directories.
Click to hide internal directories.