Adds the database abstraction layer (DAL) with a Transactions method and a Connection object to encapsulate the DB open connection. Includes a DAL unit test using the go-sqlmock library. Connection to a PostgreSQL database using environment variables to store the secrets. Overall, with the /transactions endpoint requesting directly to the DB, this patch finish the tracer bullet project. Issues #1, #5, #6 and #7
6 lines
63 B
Go
6 lines
63 B
Go
package entities
|
|
|
|
type Credentials struct {
|
|
Database string
|
|
}
|