Skip to content

Commit f149473

Browse files
committed
add unsupported errors for s3 impl until ready
1 parent 0c44c24 commit f149473

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

pkg/remote/fileshare/s3fs/s3fs.go

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package s3fs
55

66
import (
77
"context"
8+
"errors"
89
"log"
910

1011
"github.com/aws/aws-sdk-go-v2/aws"
@@ -30,15 +31,15 @@ func NewS3Client(config *aws.Config) *S3Client {
3031
}
3132

3233
func (c S3Client) Read(ctx context.Context, conn *connparse.Connection, data wshrpc.FileData) (*wshrpc.FileData, error) {
33-
return nil, nil
34+
return nil, errors.ErrUnsupported
3435
}
3536

3637
func (c S3Client) ReadStream(ctx context.Context, conn *connparse.Connection, data wshrpc.FileData) <-chan wshrpc.RespOrErrorUnion[wshrpc.FileData] {
37-
return nil
38+
return wshutil.SendErrCh[wshrpc.FileData](errors.ErrUnsupported)
3839
}
3940

4041
func (c S3Client) ReadTarStream(ctx context.Context, conn *connparse.Connection, opts *wshrpc.FileCopyOpts) <-chan wshrpc.RespOrErrorUnion[iochantypes.Packet] {
41-
return nil
42+
return wshutil.SendErrCh[iochantypes.Packet](errors.ErrUnsupported)
4243
}
4344

4445
func (c S3Client) ListEntriesStream(ctx context.Context, conn *connparse.Connection, opts *wshrpc.FileListOpts) <-chan wshrpc.RespOrErrorUnion[wshrpc.CommandRemoteListEntriesRtnData] {
@@ -83,39 +84,39 @@ func (c S3Client) ListEntries(ctx context.Context, conn *connparse.Connection, o
8384
}
8485

8586
func (c S3Client) Stat(ctx context.Context, conn *connparse.Connection) (*wshrpc.FileInfo, error) {
86-
return nil, nil
87+
return nil, errors.ErrUnsupported
8788
}
8889

8990
func (c S3Client) PutFile(ctx context.Context, conn *connparse.Connection, data wshrpc.FileData) error {
90-
return nil
91+
return errors.ErrUnsupported
9192
}
9293

9394
func (c S3Client) AppendFile(ctx context.Context, conn *connparse.Connection, data wshrpc.FileData) error {
94-
return nil
95+
return errors.ErrUnsupported
9596
}
9697

9798
func (c S3Client) Mkdir(ctx context.Context, conn *connparse.Connection) error {
98-
return nil
99+
return errors.ErrUnsupported
99100
}
100101

101102
func (c S3Client) MoveInternal(ctx context.Context, srcConn, destConn *connparse.Connection, opts *wshrpc.FileCopyOpts) error {
102-
return nil
103+
return errors.ErrUnsupported
103104
}
104105

105106
func (c S3Client) CopyRemote(ctx context.Context, srcConn, destConn *connparse.Connection, srcClient fstype.FileShareClient, opts *wshrpc.FileCopyOpts) error {
106-
return nil
107+
return errors.ErrUnsupported
107108
}
108109

109110
func (c S3Client) CopyInternal(ctx context.Context, srcConn, destConn *connparse.Connection, opts *wshrpc.FileCopyOpts) error {
110-
return nil
111+
return errors.ErrUnsupported
111112
}
112113

113114
func (c S3Client) Delete(ctx context.Context, conn *connparse.Connection, recursive bool) error {
114-
return nil
115+
return errors.ErrUnsupported
115116
}
116117

117118
func (c S3Client) Join(ctx context.Context, conn *connparse.Connection, parts ...string) (string, error) {
118-
return "", nil
119+
return "", errors.ErrUnsupported
119120
}
120121

121122
func (c S3Client) GetConnectionType() string {

0 commit comments

Comments
 (0)