gsftp

package
v0.0.0-...-49adb96 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoogleCloudStorageHandler

func GoogleCloudStorageHandler(ctx context.Context, bucketName string, opts ...option.ClientOption) (*sftp.Handlers, error)

func NewReadAtBuffer

func NewReadAtBuffer(r io.ReadCloser) (io.ReaderAt, error)

Types

type SyntheticFileInfo

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

func (*SyntheticFileInfo) IsDir

func (f *SyntheticFileInfo) IsDir() bool

func (*SyntheticFileInfo) ModTime

func (f *SyntheticFileInfo) ModTime() time.Time

func (*SyntheticFileInfo) Mode

func (f *SyntheticFileInfo) Mode() os.FileMode

func (*SyntheticFileInfo) Name

func (f *SyntheticFileInfo) Name() string

func (*SyntheticFileInfo) Size

func (f *SyntheticFileInfo) Size() int64

func (*SyntheticFileInfo) Sys

func (f *SyntheticFileInfo) Sys() interface{}

type WriteAtBuffer

type WriteAtBuffer struct {

	// GrowthCoeff defines the growth rate of the internal buffer. By
	// default, the growth rate is 1, where expanding the internal
	// buffer will allocate only enough capacity to fit the new expected
	// length.
	GrowthCoeff float64

	Writer io.WriteCloser
	// contains filtered or unexported fields
}

func NewWriteAtBuffer

func NewWriteAtBuffer(w io.WriteCloser, buf []byte) *WriteAtBuffer

NewWriteAtBuffer creates a WriteAtBuffer with an internal buffer provided by buf.

func (*WriteAtBuffer) Bytes

func (b *WriteAtBuffer) Bytes() []byte

Bytes returns a slice of bytes written to the buffer.

func (*WriteAtBuffer) Close

func (b *WriteAtBuffer) Close() error

func (*WriteAtBuffer) WriteAt

func (b *WriteAtBuffer) WriteAt(p []byte, pos int64) (n int, err error)

WriteAt writes a slice of bytes to a buffer starting at the position provided The number of bytes written will be returned, or error. Can overwrite previous written slices if the write ats overlap.

Jump to

Keyboard shortcuts

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