Documentation ¶ Index ¶ Variables func NewConnection(cfg Config) (*sqlx.DB, error) type Config Constants ¶ This section is empty. Variables ¶ View Source var ( // PSQLErrUniqueConstraint holds the error code that denotes a unique constraint is // attempting to be violated. PSQLErrUniqueConstraint = "23505" ) Functions ¶ func NewConnection ¶ func NewConnection(cfg Config) (*sqlx.DB, error) NewConnection returns a new database connection with the schema applied, if not already applied. Types ¶ type Config ¶ type Config struct { User string Pass string Name string Host string Port int } Source Files ¶ View all Source files db.go schema.go Click to show internal directories. Click to hide internal directories.