sftp

package
v0.0.0-beta.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2025 License: ISC Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClosingLimitedReaderFromOffset

func ClosingLimitedReaderFromOffset(file *sftp.File, offset, length int64) (io.Reader, error)

func ClosingReader

func ClosingReader(file *sftp.File) (io.Reader, error)

func NewStore

func NewStore(ctx context.Context, proto string, storeConfig map[string]string) (storage.Store, error)

func WriteToFileAtomic

func WriteToFileAtomic(sftpClient *sftp.Client, filename string, rd io.Reader) (int64, error)

func WriteToFileAtomicTempDir

func WriteToFileAtomicTempDir(sftpClient *sftp.Client, filename string, rd io.Reader, tmpdir string) (int64, error)

Types

type Buckets

type Buckets struct {
	// contains filtered or unexported fields
}

func NewBuckets

func NewBuckets(sftpClient *sftp.Client, path string) Buckets

func (*Buckets) Create

func (buckets *Buckets) Create() error

func (*Buckets) Get

func (buckets *Buckets) Get(mac objects.MAC) (io.Reader, error)

func (*Buckets) GetBlob

func (buckets *Buckets) GetBlob(mac objects.MAC, offset uint64, length uint32) (io.Reader, error)

func (*Buckets) List

func (buckets *Buckets) List() ([]objects.MAC, error)

func (*Buckets) Path

func (buckets *Buckets) Path(mac objects.MAC) string

func (*Buckets) Put

func (buckets *Buckets) Put(mac objects.MAC, rd io.Reader) (int64, error)

func (*Buckets) Remove

func (buckets *Buckets) Remove(mac objects.MAC) error

type ClosingFileReader

type ClosingFileReader struct {
	// contains filtered or unexported fields
}

func (*ClosingFileReader) Read

func (cr *ClosingFileReader) Read(p []byte) (int, error)

type Store

type Store struct {
	// contains filtered or unexported fields
}

func (*Store) Close

func (s *Store) Close() error

func (*Store) Create

func (s *Store) Create(ctx context.Context, config []byte) error

func (*Store) DeleteLock

func (s *Store) DeleteLock(lockID objects.MAC) error

func (*Store) DeletePackfile

func (s *Store) DeletePackfile(mac objects.MAC) error

func (*Store) DeleteState

func (s *Store) DeleteState(mac objects.MAC) error

func (*Store) GetLock

func (s *Store) GetLock(lockID objects.MAC) (io.Reader, error)

func (*Store) GetLocks

func (s *Store) GetLocks() (ret []objects.MAC, err error)

Locks

func (*Store) GetPackfile

func (s *Store) GetPackfile(mac objects.MAC) (io.Reader, error)

func (*Store) GetPackfileBlob

func (s *Store) GetPackfileBlob(mac objects.MAC, offset uint64, length uint32) (io.Reader, error)

func (*Store) GetPackfiles

func (s *Store) GetPackfiles() ([]objects.MAC, error)

func (*Store) GetState

func (s *Store) GetState(mac objects.MAC) (io.Reader, error)

func (*Store) GetStates

func (s *Store) GetStates() ([]objects.MAC, error)

Indexes

func (*Store) Location

func (s *Store) Location() string

func (*Store) Mode

func (s *Store) Mode() storage.Mode

func (*Store) Open

func (s *Store) Open(ctx context.Context) ([]byte, error)

func (*Store) Path

func (s *Store) Path(args ...string) string

func (*Store) PutLock

func (s *Store) PutLock(lockID objects.MAC, rd io.Reader) (int64, error)

func (*Store) PutPackfile

func (s *Store) PutPackfile(mac objects.MAC, rd io.Reader) (int64, error)

func (*Store) PutState

func (s *Store) PutState(mac objects.MAC, rd io.Reader) (int64, error)

func (*Store) Size

func (s *Store) Size() int64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址