package
0.0.0-20211117200936-42c2596a9fde
Repository: https://github.com/diwise/api-temperature.git
Documentation: pkg.go.dev
# Functions
GetFromContext extracts the database wrapper, if any, from the provided context.
Middleware packs a pointer to the datastore into context.
NewDatabaseConnection initializes a new connection to the database and wraps it in a Datastore.
NewPostgreSQLConnector opens a connection to a postgresql database.
NewSQLiteConnector opens a connection to a local sqlite database.
# Interfaces
Datastore is an interface that is used to inject the database into different handlers to improve testability.
# Type aliases
ConnectorFunc is used to inject a database connection method into NewDatabaseConnection.