docs: updated readme
This commit is contained in:
parent
91da9b7035
commit
652b2ea716
18
README.md
18
README.md
@ -33,24 +33,22 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"log"
|
||||||
|
|
||||||
"git.dragse.it/anthrove/otter-space-sdk/v2/pkg/database"
|
"git.dragse.it/anthrove/otter-space-sdk/v2/pkg/database"
|
||||||
"git.dragse.it/anthrove/otter-space-sdk/v2/pkg/models"
|
"git.dragse.it/anthrove/otter-space-sdk/v2/pkg/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
var err error
|
ctx := context.Background()
|
||||||
dbDebug := false
|
cfg := models.DatabaseConfig{}
|
||||||
ctx := context.Background()
|
|
||||||
|
pgClient := database.NewPostgresqlConnection()
|
||||||
pgClient := database.NewPostgresqlConnection(dbDebug)
|
err := pgClient.Connect(ctx, cfg)
|
||||||
err = pgClient.Connect(ctx, "your-endpoint", "your-username", "your-password", "anthrove", 5432, "disable", "Europe/Berlin")
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
log.Panic(err)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
// further usage of the client...
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user