Add 'graph/' from commit 'f1efaddc27c74c9de4509cd864fc673ffdf52e19'

git-subtree-dir: graph
git-subtree-mainline: 396d5d3a2f
git-subtree-split: f1efaddc27
This commit is contained in:
A.Unger
2020-09-18 12:59:28 +02:00
67 changed files with 5465 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
package cs3
import (
gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
"google.golang.org/grpc"
)
func newConn(endpoint string) (*grpc.ClientConn, error) {
conn, err := grpc.Dial(endpoint, grpc.WithInsecure())
if err != nil {
return nil, err
}
return conn, nil
}
// GetGatewayServiceClient returns a new cs3 gateway client
func GetGatewayServiceClient(endpoint string) (gateway.GatewayAPIClient, error) {
conn, err := newConn(endpoint)
if err != nil {
return nil, err
}
return gateway.NewGatewayAPIClient(conn), nil
}