netfox

package
v0.1.1-alpha Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: BSD-3-Clause Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProtocols

func GetProtocols() []string

func RegisterProtocol

func RegisterProtocol(h ProtocolHandler)

Types

type FTPVFS

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

func NewFTPVFS

func NewFTPVFS(parent vfs.VFS, host, port, user, pass string, options map[string]string) (*FTPVFS, error)

func (*FTPVFS) Abs

func (v *FTPVFS) Abs(p string) (string, error)

func (*FTPVFS) Base

func (v *FTPVFS) Base(p string) string

func (*FTPVFS) Clone

func (v *FTPVFS) Clone() vfs.VFS

func (*FTPVFS) Close

func (v *FTPVFS) Close() error

func (*FTPVFS) Create

func (v *FTPVFS) Create(ctx context.Context, p string) (io.WriteCloser, error)

func (*FTPVFS) Dir

func (v *FTPVFS) Dir(p string) string

func (*FTPVFS) GetCapabilities

func (v *FTPVFS) GetCapabilities() vfs.VFSCapabilities

func (*FTPVFS) GetPath

func (v *FTPVFS) GetPath() string

func (*FTPVFS) IsAtRoot

func (v *FTPVFS) IsAtRoot() bool

func (*FTPVFS) Join

func (v *FTPVFS) Join(e ...string) string

func (*FTPVFS) MkDir

func (v *FTPVFS) MkDir(ctx context.Context, p string) error

func (*FTPVFS) Open

func (v *FTPVFS) Open(ctx context.Context, p string) (vfs.ReadAtCloser, error)

func (*FTPVFS) ParentVFS

func (v *FTPVFS) ParentVFS() vfs.VFS

func (*FTPVFS) ReadDir

func (v *FTPVFS) ReadDir(ctx context.Context, p string, onChunk func([]vfs.VFSItem)) error

func (*FTPVFS) Remove

func (v *FTPVFS) Remove(ctx context.Context, p string) error

func (*FTPVFS) Rename

func (v *FTPVFS) Rename(ctx context.Context, o, n string) error

func (*FTPVFS) Search

func (v *FTPVFS) Search(ctx context.Context, p, pat string) (chan int64, error)

func (*FTPVFS) SetAttributes

func (v *FTPVFS) SetAttributes(ctx context.Context, path string, item vfs.VFSItem) error

func (*FTPVFS) SetPath

func (v *FTPVFS) SetPath(p string) error

func (*FTPVFS) Stat

func (v *FTPVFS) Stat(ctx context.Context, p string) (vfs.VFSItem, error)

type NetFoxConfig

type NetFoxConfig struct {
	Type    string            `json:"Type"`
	Host    string            `json:"Host"`
	Port    string            `json:"Port"`
	User    string            `json:"User"`
	Pass    string            `json:"Pass"`
	Options map[string]string `json:"Options,omitempty"`
}

type NetFoxPlugin

type NetFoxPlugin struct{}

func (*NetFoxPlugin) Close

func (p *NetFoxPlugin) Close() error

func (*NetFoxPlugin) GetName

func (p *NetFoxPlugin) GetName() string

func (*NetFoxPlugin) Init

func (p *NetFoxPlugin) Init(api vfs.HostAPI) error

type NetFoxVFS

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

func NewNetFoxVFS

func NewNetFoxVFS(dbPath string) *NetFoxVFS

func (*NetFoxVFS) Abs

func (v *NetFoxVFS) Abs(p string) (string, error)

func (*NetFoxVFS) Base

func (v *NetFoxVFS) Base(p string) string

func (*NetFoxVFS) Clone

func (v *NetFoxVFS) Clone() vfs.VFS

func (*NetFoxVFS) Close

func (v *NetFoxVFS) Close() error

func (*NetFoxVFS) Create

func (v *NetFoxVFS) Create(ctx context.Context, p string) (io.WriteCloser, error)

func (*NetFoxVFS) Dir

func (v *NetFoxVFS) Dir(p string) string

func (*NetFoxVFS) GetCapabilities

func (v *NetFoxVFS) GetCapabilities() vfs.VFSCapabilities

func (*NetFoxVFS) GetPath

func (v *NetFoxVFS) GetPath() string

func (*NetFoxVFS) IsAtRoot

func (v *NetFoxVFS) IsAtRoot() bool

func (*NetFoxVFS) Join

func (v *NetFoxVFS) Join(e ...string) string

func (*NetFoxVFS) MkDir

func (v *NetFoxVFS) MkDir(ctx context.Context, p string) error

func (*NetFoxVFS) Open

func (v *NetFoxVFS) Open(ctx context.Context, p string) (vfs.ReadAtCloser, error)

func (*NetFoxVFS) ParentVFS

func (v *NetFoxVFS) ParentVFS() vfs.VFS

func (*NetFoxVFS) ReadDir

func (v *NetFoxVFS) ReadDir(ctx context.Context, p string, onChunk func([]vfs.VFSItem)) error

func (*NetFoxVFS) Remove

func (v *NetFoxVFS) Remove(ctx context.Context, p string) error

func (*NetFoxVFS) Rename

func (v *NetFoxVFS) Rename(ctx context.Context, old, new string) error

func (*NetFoxVFS) SaveConfig

func (v *NetFoxVFS) SaveConfig(name string, cfg NetFoxConfig)

func (*NetFoxVFS) Search

func (v *NetFoxVFS) Search(ctx context.Context, p, pat string) (chan int64, error)

func (*NetFoxVFS) SetAttributes

func (v *NetFoxVFS) SetAttributes(ctx context.Context, path string, item vfs.VFSItem) error

func (*NetFoxVFS) SetPath

func (v *NetFoxVFS) SetPath(p string) error

func (*NetFoxVFS) Stat

func (v *NetFoxVFS) Stat(ctx context.Context, p string) (vfs.VFSItem, error)

type ProtocolHandler

type ProtocolHandler interface {
	Prefix() string
	DefaultPort() string
	BuildExtraUI(cfg *NetFoxConfig, x, y, w, h int) (vtui.UIElement, func())
}

type SFTPVFS

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

func NewSFTPVFS

func NewSFTPVFS(parent vfs.VFS, host, port, user, pass string) (*SFTPVFS, error)

func (*SFTPVFS) Abs

func (v *SFTPVFS) Abs(p string) (string, error)

func (*SFTPVFS) Base

func (v *SFTPVFS) Base(p string) string

func (*SFTPVFS) Clone

func (v *SFTPVFS) Clone() vfs.VFS

func (*SFTPVFS) Close

func (v *SFTPVFS) Close() error

func (*SFTPVFS) Create

func (v *SFTPVFS) Create(ctx context.Context, p string) (io.WriteCloser, error)

func (*SFTPVFS) Dir

func (v *SFTPVFS) Dir(p string) string

func (*SFTPVFS) GetCapabilities

func (v *SFTPVFS) GetCapabilities() vfs.VFSCapabilities

func (*SFTPVFS) GetPath

func (v *SFTPVFS) GetPath() string

func (*SFTPVFS) IsAtRoot

func (v *SFTPVFS) IsAtRoot() bool

func (*SFTPVFS) Join

func (v *SFTPVFS) Join(e ...string) string

func (*SFTPVFS) MkDir

func (v *SFTPVFS) MkDir(ctx context.Context, p string) error

func (*SFTPVFS) Open

func (v *SFTPVFS) Open(ctx context.Context, p string) (vfs.ReadAtCloser, error)

func (*SFTPVFS) OpenPty

func (v *SFTPVFS) OpenPty(cols, rows int) (any, error)

func (*SFTPVFS) ParentVFS

func (v *SFTPVFS) ParentVFS() vfs.VFS

func (*SFTPVFS) ReadDir

func (v *SFTPVFS) ReadDir(ctx context.Context, p string, onChunk func([]vfs.VFSItem)) error

func (*SFTPVFS) Remove

func (v *SFTPVFS) Remove(ctx context.Context, p string) error

func (*SFTPVFS) Rename

func (v *SFTPVFS) Rename(ctx context.Context, o, n string) error

func (*SFTPVFS) Search

func (v *SFTPVFS) Search(ctx context.Context, p, pat string) (chan int64, error)

func (*SFTPVFS) SetAttributes

func (v *SFTPVFS) SetAttributes(ctx context.Context, path string, item vfs.VFSItem) error

func (*SFTPVFS) SetPath

func (v *SFTPVFS) SetPath(p string) error

func (*SFTPVFS) Stat

func (v *SFTPVFS) Stat(ctx context.Context, p string) (vfs.VFSItem, error)

type SSHPty

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

func NewSSHPty

func NewSSHPty(client *ssh.Client) (*SSHPty, error)

func (*SSHPty) Close

func (p *SSHPty) Close() error

func (*SSHPty) IsBusy

func (p *SSHPty) IsBusy() bool

func (*SSHPty) Read

func (p *SSHPty) Read(b []byte) (int, error)

func (*SSHPty) Run

func (p *SSHPty) Run(name string, args ...string) error

func (*SSHPty) SetSize

func (p *SSHPty) SetSize(cols, rows int)

func (*SSHPty) Wait

func (p *SSHPty) Wait() error

func (*SSHPty) Write

func (p *SSHPty) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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