Documentation
¶
Index ¶
- Variables
- func CompareBCryptHash(hash, password string) error
- func MakeBCryptHash(password string) (string, error)
- func Migrate(db *gorm.DB) error
- func Module() fx.Option
- type Service
- func (s *Service) ChangePassword(ctx context.Context, username, currentPassword, newPassword string) error
- func (s *Service) Create(username, password string) (*User, error)
- func (s *Service) GetByUsername(username string) (*User, error)
- func (s *Service) Login(ctx context.Context, username, password string) (*User, error)
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("user not found") ErrExists = errors.New("user already exists") )
View Source
var (
ErrPasswordInvalid = errors.New("invalid password")
)
Functions ¶
func CompareBCryptHash ¶
func MakeBCryptHash ¶
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) ChangePassword ¶
Click to show internal directories.
Click to hide internal directories.