Documentation ¶
Overview ¶
database implementations
db package contains all database implementations this application will need sc-db defines interaction with the SoulCycle central database
Index ¶
Constants ¶
View Source
const (
// Database "types"
DBTypeFC = "fc-db"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { // Close is used to call a `Close` method of the underlying database driver Close() error // GetInstance returns an internal sqlx.DB instance to allow // for direct access to the database GetInstance() *sqlx.DB // SetInstance sets an internal sqlx.DB instance to allow // for direct access to the database SetInstance(*sqlx.DB) DB // String returns the "type" of database as a string - used in health checks String() string // Ready checks if the DB is "ready" - used in health checks Ready() error }
Interface that all database implementations must fulfill
type DSNConfig ¶
type DSNConfig struct { Username string // The username to use when connecting to the DB server Password string // The password to use when connecting to the DB server DatabaseName string // The name of the database to use TCP DSNConfigTCP // Struct containing information for TCP connections Timeout int // The max time (in seconds) to wait for operations to complete Dialect string // The database dialect to use }
Struct representing configuration settings that should be used to create a database DSN string
type DSNConfigTCP ¶
Struct containing information for TCP connections
Click to show internal directories.
Click to hide internal directories.