Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New gateway datatx service. #1229

Merged
merged 5 commits into from
Oct 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}