Documentation ¶
Index ¶
- Constants
- func CountUserByEmail(ctx context.Context, email string) (int64, error)
- func InsertUser(ctx context.Context, user *User) error
- func Login(ctx context.Context, req *auth.LoginRequest) (*auth.LoginResponse, error)
- func Register(ctx context.Context, req *auth.RegisterRequest) (*auth.RegisterResponse, error)
- func UpdateUser(ctx context.Context, user *User) error
- func VerifyPassword(storedPassword *HashedPassword, inputPassword string) error
- type HashedPassword
- type User
Constants ¶
View Source
const ( UserCollection = "users" UserEmailField = "email" UserPasswordField = "password" )
Variables ¶
This section is empty.
Functions ¶
func Login ¶
func Login(ctx context.Context, req *auth.LoginRequest) (*auth.LoginResponse, error)
func Register ¶
func Register(ctx context.Context, req *auth.RegisterRequest) (*auth.RegisterResponse, error)
func VerifyPassword ¶
func VerifyPassword(storedPassword *HashedPassword, inputPassword string) error
Types ¶
type HashedPassword ¶
func GeneratePassword ¶
func GeneratePassword(rawPassword string) (*HashedPassword, error)
Click to show internal directories.
Click to hide internal directories.