added sftp client implementation
This commit is contained in:
parent
ad41ddbe54
commit
ce73f0472c
175 changed files with 28135 additions and 13 deletions
45
pkg/provider/sftp/error.go
Normal file
45
pkg/provider/sftp/error.go
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
// Copyright (C) 2022 Marius Schellenberger
|
||||
package sftp
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"io/fs"
|
||||
|
||||
"github.com/pkg/sftp"
|
||||
)
|
||||
|
||||
var ErrNotConnected = errors.New("sftp not connected")
|
||||
|
||||
type connError struct{}
|
||||
|
||||
func (connError) Remove(_ string) error {
|
||||
return ErrNotConnected
|
||||
}
|
||||
|
||||
func (connError) Open(_ string) (*sftp.File, error) {
|
||||
return nil, ErrNotConnected
|
||||
}
|
||||
|
||||
func (connError) OpenFile(_ string, _ int) (*sftp.File, error) {
|
||||
return nil, ErrNotConnected
|
||||
}
|
||||
|
||||
func (connError) Stat(_ string) (fs.FileInfo, error) {
|
||||
return nil, ErrNotConnected
|
||||
}
|
||||
|
||||
func (connError) ReadDir(_ string) ([]fs.FileInfo, error) {
|
||||
return nil, ErrNotConnected
|
||||
}
|
||||
|
||||
func (connError) MkdirAll(_ string) error {
|
||||
return ErrNotConnected
|
||||
}
|
||||
|
||||
func (connError) Wait() error {
|
||||
return ErrNotConnected
|
||||
}
|
||||
|
||||
func (connError) Close() error {
|
||||
return nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue