diff --git a/README.md b/README.md index c61749c..5096c0a 100644 --- a/README.md +++ b/README.md @@ -33,23 +33,33 @@ package main import ( "context" - "log" "git.anthrove.art/Anthrove/otter-space-sdk/v3/pkg/database" "git.anthrove.art/Anthrove/otter-space-sdk/v3/pkg/models" ) func main() { - ctx := context.Background() - cfg := models.DatabaseConfig{} - - pgClient := database.NewPostgresqlConnection() - err := pgClient.Connect(ctx, cfg) - if err != nil { - log.Panic(err) + ctx := context.Background() + var err error + + config := models.DatabaseConfig{ + Endpoint: "", + Username: "", + Password: "", + Database: "", + Port: 5432, + SSL: false, + Timezone: "Europe/Berlin", + Debug: false, } - + + err = database.Connect(ctx, config) + if err != nil { + panic(err) + } + } + ``` This example creates a new client, connects to the OtterSpace API, and then the client can be used to interact with the API.