Skip to content

Commit

Permalink
Merge pull request #67 from rafaelespinoza/feat-postgres
Browse files Browse the repository at this point in the history
Add support for Postgres
  • Loading branch information
eikendev committed Jul 15, 2023
2 parents 551a706 + e2fbfbb commit f69833a
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 63 deletions.
8 changes: 5 additions & 3 deletions config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ http:
trustedproxies: []

database:
# Currently sqlite3 and mysql are supported.
# Currently sqlite3, mysql, and postgres are supported.
dialect: 'sqlite3'

# For sqlite3, specifies the database file. For mysql, specifies the connection string. Check out
# https://github.com/go-sql-driver/mysql#dsn-data-source-name for details.
# - For sqlite3, specify the database file.
# - For mysql specify the connection string. See details at https://github.com/go-sql-driver/mysql#dsn-data-source-name
# - For postgres, see https://github.com/jackc/pgx.
# Also consider the canonical docs at https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING.
connection: 'pushbits.db'

admin:
Expand Down
24 changes: 10 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,41 @@ require (
github.com/jinzhu/configor v1.2.1
github.com/sirupsen/logrus v1.9.0
github.com/stretchr/testify v1.8.2
github.com/swaggo/swag v1.8.11
gopkg.in/yaml.v2 v2.4.0
gorm.io/driver/mysql v1.4.7
gorm.io/driver/postgres v1.5.2
gorm.io/driver/sqlite v1.4.4
gorm.io/gorm v1.24.6
gorm.io/gorm v1.25.0
maunium.net/go/mautrix v0.15.0
)

require (
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/bytedance/sonic v1.8.6 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/spec v0.20.8 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.12.0 // indirect
github.com/go-sql-driver/mysql v1.7.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgx/v5 v5.3.1 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/leodido/go-urn v1.2.2 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.18 // indirect
github.com/mattn/go-sqlite3 v1.14.16 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.7 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/rs/zerolog v1.29.0 // indirect
github.com/tidwall/gjson v1.14.4 // indirect
github.com/tidwall/match v1.1.1 // indirect
Expand All @@ -56,11 +53,10 @@ require (
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/tools v0.7.0 // indirect
golang.org/x/crypto v0.8.0 // indirect
golang.org/x/net v0.9.0 // indirect
golang.org/x/sys v0.7.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
maunium.net/go/maulogger/v2 v2.4.1 // indirect
Expand Down
Loading

0 comments on commit f69833a

Please sign in to comment.