Documentation ¶
Overview ¶
Package database provides a connection to the database backend of eveauth. While presenting a high-level interface to the rest of the application, the package can use underlying connections to different database systems.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection interface { // Connect tries to establish a connection to the database backend, returning an error if the attempt failed Connect() error // RawQuery performs a raw database query and returns a map of interfaces containing the retrieve data. An error is returned if the query failed RawQuery(query string, v ...interface{}) ([]map[string]interface{}, error) // LoadAllLootPastes retrieves all loot pastes from the database, returning an error if the query failed LoadAllLootPastes() ([]*models.LootPaste, error) // SaveLootPaste saves a loot paste to the database, returning the updated model or an error if the query failed SaveLootPaste(lootPaste *models.LootPaste) (*models.LootPaste, error) }
Connection provides an interface for communicating with a database backend in order to retrieve and persist the needed information
func SetupDatabase ¶
func SetupDatabase(conf *misc.Configuration) (Connection, error)
SetupDatabase parses the database type set in the configuration and returns an appropriate database implementation or an error if the type is unknown
Click to show internal directories.
Click to hide internal directories.