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

21 lines
467 B
Go
Raw Normal View History

2024-02-20 18:11:34 +00:00
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
}