Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection interface { CreateUser(email, hashedPassword string) (User, error) FindUser(email string) (User, error) FindUserAliases(userID uint) ([]Alias, error) FindAlias(host, domain string) (Alias, error) CreateAlias(alias Alias, userID uint) (Alias, error) DeleteAlias(host, domain string, userID uint) error UpdateAlias(alias Alias) (Alias, error) }
Connection represent a connection to the database to perform CRUD
func OpenConnection ¶
func OpenConnection(conf config.DatabaseConfig, logger *zerolog.Logger) (Connection, error)
OpenConnection tries to open a new database connection using given config
Click to show internal directories.
Click to hide internal directories.