Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { CreateUser(ctx context.Context, email string, passwordHash []byte) (uint64, error) User(ctx context.Context, email string) (*models.User, error) }
Database interface definition for the application.
type SQLDatabase ¶
type SQLDatabase struct {
// contains filtered or unexported fields
}
SQLDatabase struct definition.
func StartDB ¶
func StartDB(ctx context.Context, databaseUrl string) (*SQLDatabase, error)
StartDB connection to a db instance given a database url.
func (*SQLDatabase) CreateUser ¶
func (d *SQLDatabase) CreateUser(ctx context.Context, email string, passwordHash []byte) (uint64, error)
CreateUser and save it to the database.
Click to show internal directories.
Click to hide internal directories.