This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
plug-sdk/pkg/otter/connect.go
2024-02-20 19:11:34 +01:00

21 lines
467 B
Go

package otter
import (
"context"
"git.dragse.it/anthrove/otter-space-sdk/pkg/graph"
)
func ConnectToDatabase(ctx context.Context, endpoint string, username string, password string, debug bool) (graph.OtterSpace, error) {
var graphConnection graph.OtterSpace
var err error
graphConnection = graph.NewGraphConnection(debug)
err = graphConnection.Connect(ctx, endpoint, username, password)
if err != nil {
return nil, err
}
return graphConnection, err
}