Documentation ¶
Index ¶
- func DebugServer(w http.ResponseWriter, req *http.Request)
- func InitInode(inode uint64)
- func NewConfig(user, password string, privateKeyPath string) *ssh.ClientConfig
- func NewSftp(config *ssh.ClientConfig, server string) (*sftp.Client, error)
- func PublicKeyFile(file string) (ssh.AuthMethod, error)
- type Dir
- func (d *Dir) Attr(ctx context.Context, a *fuse.Attr) error
- func (d *Dir) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (fs.Node, fs.Handle, error)
- func (d *Dir) Link(ctx context.Context, req *fuse.LinkRequest, old fs.Node) (fs.Node, error)
- func (d *Dir) Lookup(ctx context.Context, name string) (fs.Node, error)
- func (d *Dir) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fs.Node, error)
- func (d *Dir) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error)
- func (d *Dir) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error)
- func (d *Dir) Release(ctx context.Context, req *fuse.ReleaseRequest) error
- func (d *Dir) Remove(ctx context.Context, req *fuse.RemoveRequest) error
- func (d *Dir) Rename(ctx context.Context, req *fuse.RenameRequest, newDir fs.Node) error
- func (d *Dir) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error
- func (d *Dir) Symlink(ctx context.Context, req *fuse.SymlinkRequest) (fs.Node, error)
- type File
- func (f *File) Attr(ctx context.Context, a *fuse.Attr) error
- func (f *File) Flush(ctx context.Context, req *fuse.FlushRequest) error
- func (f *File) Fsync(ctx context.Context, req *fuse.FsyncRequest) error
- func (f *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error)
- func (f *File) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error
- func (f *File) Release(ctx context.Context, req *fuse.ReleaseRequest) error
- func (f *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error
- func (f *File) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) error
- type Node
- func (n *Node) GetChild(name string) (*Node, bool)
- func (n *Node) GetInode() uint64
- func (n *Node) IsDir() bool
- func (n *Node) IsRoot() bool
- func (n *Node) LocalPath() string
- func (n *Node) MarshalJSON() ([]byte, error)
- func (n *Node) Path() string
- func (n *Node) Remove()
- func (n *Node) Rename(onode, ndir *Node, nname string)
- func (n *Node) Save()
- type SSHFS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugServer ¶
func DebugServer(w http.ResponseWriter, req *http.Request)
DebugServer hello world, the web server
func NewConfig ¶
func NewConfig(user, password string, privateKeyPath string) *ssh.ClientConfig
NewConfig creates a new config
Types ¶
type Dir ¶
Dir implements both Node and Handle
func (*Dir) Create ¶
func (d *Dir) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (fs.Node, fs.Handle, error)
Create Dir
func (*Dir) Open ¶
func (d *Dir) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error)
Open Dir
func (*Dir) ReadDirAll ¶
ReadDirAll returns a list of sshfs
func (*Dir) Setattr ¶
func (d *Dir) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error
Setattr Dir
type File ¶
File Node
func (*File) Open ¶
func (f *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error)
Open File
func (*File) Read ¶
func (f *File) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error
Read File
func (*File) Setattr ¶
func (f *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error
Setattr File
func (*File) Write ¶
func (f *File) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) error
Write File
type Node ¶
Node 文件系统节点,用于描述目录或者文件的文件系统属性
type SSHFS ¶
SSHFS is a ssh filesystem
func New ¶
func New(config *ssh.ClientConfig, mountpoint, server, root string) (*SSHFS, error)
New returns a new SSHFS
func (*SSHFS) Statfs ¶
func (v *SSHFS) Statfs(ctx context.Context, req *fuse.StatfsRequest, resp *fuse.StatfsResponse) error
Statfs sshfs
Click to show internal directories.
Click to hide internal directories.