Skip to content

Commit

Permalink
New gateway datatx service. (#1229)
Browse files Browse the repository at this point in the history
  • Loading branch information
redblom authored Oct 7, 2020
1 parent 2c31ba8 commit a761b31
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/unreleased/new-gateway-datatx-service.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: New gateway datatx service

Represents the CS3 datatx module in the gateway.

https://github.com/cs3org/reva/pull/1229
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
45 changes: 45 additions & 0 deletions internal/grpc/services/gateway/datatx.go
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit a761b31

Please sign in to comment.