Documentation ¶
Overview ¶
Package db implements a service for interacting with the database.
Index ¶
- type Service
- func (s *Service) ChangePassword(username, salt, hash string) (err error)
- func (s *Service) Close() (err error)
- func (s *Service) Connect(dbName string, mode os.FileMode, options *bolt.Options) (err error)
- func (s *Service) DeleteUser(username string) (err error)
- func (s *Service) GetEmail(username string) (email string, err error)
- func (s *Service) GetSaltAndHash(username string) (salt, hash string, err error)
- func (s *Service) InsertUser(username, salt, hash, email string) (err error)
- func (s *Service) SetLogger(logger *log.Logger)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a service that interacts with the database.
func (*Service) ChangePassword ¶
ChangePassword changes the password for a given username.
func (*Service) DeleteUser ¶
DeleteUser deletes an existing user from the database by username.
func (*Service) GetSaltAndHash ¶
GetSaltAndHash gets the salt and hash for a given username.
func (*Service) InsertUser ¶
InsertUser inserts a new user into the database.
Click to show internal directories.
Click to hide internal directories.