From a761b3158c506788b4e580133dd2e5dd4598c043 Mon Sep 17 00:00:00 2001 From: Antoon P Date: Wed, 7 Oct 2020 15:50:35 +0200 Subject: [PATCH] New gateway datatx service. (#1229) --- .../unreleased/new-gateway-datatx-service.md | 5 +++ go.mod | 2 +- internal/grpc/services/gateway/datatx.go | 45 +++++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/new-gateway-datatx-service.md create mode 100644 internal/grpc/services/gateway/datatx.go diff --git a/changelog/unreleased/new-gateway-datatx-service.md b/changelog/unreleased/new-gateway-datatx-service.md new file mode 100644 index 0000000000..57a5f78ea5 --- /dev/null +++ b/changelog/unreleased/new-gateway-datatx-service.md @@ -0,0 +1,5 @@ +Enhancement: New gateway datatx service + +Represents the CS3 datatx module in the gateway. + +https://github.com/cs3org/reva/pull/1229 \ No newline at end of file diff --git a/go.mod b/go.mod index 183435cdf5..201f1f8dc5 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/cheggaaa/pb v1.0.29 github.com/coreos/go-oidc v2.2.1+incompatible github.com/cs3org/cato v0.0.0-20200828125504-e418fc54dd5e - github.com/cs3org/go-cs3apis v0.0.0-20200903142434-7dfeb0059208 + github.com/cs3org/go-cs3apis v0.0.0-20200929101248-821df597ec8d github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/eventials/go-tus v0.0.0-20200718001131-45c7ec8f5d59 github.com/go-ldap/ldap/v3 v3.2.3 diff --git a/internal/grpc/services/gateway/datatx.go b/internal/grpc/services/gateway/datatx.go new file mode 100644 index 0000000000..48bad5366e --- /dev/null +++ b/internal/grpc/services/gateway/datatx.go @@ -0,0 +1,45 @@ +// Copyright 2018-2020 CERN +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// In applying this license, CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +package gateway + +import ( + "context" + + tx "github.com/cs3org/go-cs3apis/cs3/tx/v1beta1" + "github.com/cs3org/reva/pkg/rgrpc/status" + "github.com/pkg/errors" +) + +func (s *svc) CreateTransfer(ctx context.Context, req *tx.CreateTransferRequest) (*tx.CreateTransferResponse, error) { + return &tx.CreateTransferResponse{ + Status: status.NewUnimplemented(ctx, errors.New("CreateTransfer not implemented"), "CreateTransfer not implemented"), + }, nil +} + +func (s *svc) GetTransferStatus(ctx context.Context, in *tx.GetTransferStatusRequest) (*tx.GetTransferStatusResponse, error) { + return &tx.GetTransferStatusResponse{ + Status: status.NewUnimplemented(ctx, errors.New("GetTransferStatus not implemented"), "GetTransferStatus not implemented"), + }, nil +} + +func (s *svc) CancelTransfer(ctx context.Context, in *tx.CancelTransferRequest) (*tx.CancelTransferResponse, error) { + return &tx.CancelTransferResponse{ + Status: status.NewUnimplemented(ctx, errors.New("CancelTransfer not implemented"), "CancelTransfer not implemented"), + }, nil +}