Connection to resources.
go get github.com/worldline-go/conn| Database | Type | Package |
|---|---|---|
| Postgres | pgx | github.com/jackc/pgx/v5/stdlib |
// "github.com/worldline-go/conn/database"
// _ "github.com/jackc/pgx/v5/stdlib"
db, err := database.Connect(ctx, "pgx", "postgres://postgres@localhost:5432/postgres")Redis connection return redis.UniversalClient which is a client that can connect to multiple Redis servers.
// import "github.com/worldline-go/conn/connredis"
client, err := connredis.New(connredis.Config{})