mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/44 Reviewed By: alexsn Differential Revision: D17657719 fbshipit-source-id: 9bbe18dc0e9c553f8a2df81018d7db06f38f5e0e
19 lines
503 B
Cheetah
19 lines
503 B
Cheetah
{{/*
|
|
Copyright 2019-present Facebook Inc. All rights reserved.
|
|
This source code is licensed under the Apache 2.0 license found
|
|
in the LICENSE file in the root directory of this source tree.
|
|
*/}}
|
|
|
|
{{ define "dialect/gremlin/client/open" }}
|
|
u, err := url.Parse(dataSourceName)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
c, err := gremlin.NewClient(gremlin.Config{
|
|
Endpoint: gremlin.Endpoint{
|
|
URL: u,
|
|
},
|
|
})
|
|
drv := gremlin.NewDriver(c)
|
|
return NewClient(append(options, Driver(drv))...), nil
|
|
{{ end }} |