Documentation
¶
Index ¶
- type Database
- func (db *Database) Close() error
- func (db *Database) CreateUser(newUser *NewUser) error
- func (db *Database) DeleteUser(username string) error
- func (db *Database) GetStat() (*Stat, error)
- func (db *Database) GetUser(username string) (*User, error)
- func (db *Database) UserCount() (uint64, error)
- func (db *Database) UserExists(username string) (bool, error)
- type NewUser
- type Stat
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
func (*Database) CreateUser ¶
CreareUser reates a new user in the 'users' table. A non-nil error is returned if query execution fails.
func (*Database) DeleteUser ¶
DeleteUser removes a user from the 'users' table based on its username. A non-nil error is returned if the query cannot be executed or no user is found.
func (*Database) GetUser ¶
GetUser reads the 'users' table and returns the user with the specified username. A non-nil error is returned if the query cannot be executed or if no user is found.
Click to show internal directories.
Click to hide internal directories.