remote

package
v0.0.0-...-5d142b5 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRemoteFileSystem

func NewRemoteFileSystem(url string) (filesystem.FileSystem, error)

Types

type DeleteRequest

type DeleteRequest struct {
	File string
}

type DeleteResponse

type DeleteResponse struct {
	RemoteResponse
}

type DirRequest

type DirRequest struct {
	File string
}

type DirResponse

type DirResponse struct {
	RemoteResponse
	Files []filesystem.File
}

type FileMapRequest

type FileMapRequest struct {
	File filesystem.File
}

type FileMapResponse

type FileMapResponse struct {
	RemoteResponse
	FileMap filesystem.FileMap
}

type FileTreeRequest

type FileTreeRequest struct {
	File filesystem.File
}

type FileTreeResponse

type FileTreeResponse struct {
	RemoteResponse
	FileTree *filesystem.FileTree
}

type MkDirRequest

type MkDirRequest struct {
	File filesystem.File
}

type MkDirResponse

type MkDirResponse struct {
	RemoteResponse
}

type ReadFileRequest

type ReadFileRequest struct {
	File string
}

type ReadFileResponse

type ReadFileResponse struct {
	RemoteResponse
	File filesystem.File
}

type ReadRequest

type ReadRequest struct {
	File filesystem.File
}

type ReadResponse

type ReadResponse struct {
	RemoteResponse
	Data []byte
}

type RemoteFileSystem

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

A Remote FileSystem is essentially a Mirror daemon running on a remote host that can be communicated to over an HTTP(s) connection. Under the hood, it delegates to the StdFileSystem File System but is wrapped in a Go RPC server.

func (RemoteFileSystem) Delete

func (f RemoteFileSystem) Delete(file string) error

func (RemoteFileSystem) Dir

func (f RemoteFileSystem) Dir(dir string) ([]filesystem.File, error)

func (RemoteFileSystem) FileMap

func (RemoteFileSystem) FileTree

func (RemoteFileSystem) MkDir

func (f RemoteFileSystem) MkDir(file filesystem.File) error

func (RemoteFileSystem) Read

func (f RemoteFileSystem) Read(file filesystem.File) ([]byte, error)

func (RemoteFileSystem) ReadFile

func (f RemoteFileSystem) ReadFile(file string) (filesystem.File, error)

func (RemoteFileSystem) RemoteDelete

func (f RemoteFileSystem) RemoteDelete(req *DeleteRequest, res *DeleteResponse) error

func (RemoteFileSystem) RemoteDir

func (f RemoteFileSystem) RemoteDir(req *DirRequest, res *DirResponse) error

func (RemoteFileSystem) RemoteFileMap

func (f RemoteFileSystem) RemoteFileMap(req *FileMapRequest, res *FileMapResponse) error

func (RemoteFileSystem) RemoteFileTree

func (f RemoteFileSystem) RemoteFileTree(req *FileTreeRequest, res *FileTreeResponse) error

func (RemoteFileSystem) RemoteMkDir

func (f RemoteFileSystem) RemoteMkDir(req *MkDirRequest, res *MkDirResponse) error

func (RemoteFileSystem) RemoteRead

func (f RemoteFileSystem) RemoteRead(req *ReadRequest, res *ReadResponse) error

func (RemoteFileSystem) RemoteReadFile

func (f RemoteFileSystem) RemoteReadFile(req *ReadFileRequest, res *ReadFileResponse) error

func (*RemoteFileSystem) RemoteWrite

func (f *RemoteFileSystem) RemoteWrite(req *WriteRequest, res *RemoteResponse) error

func (RemoteFileSystem) Write

func (f RemoteFileSystem) Write(file filesystem.File, data []byte, perm os.FileMode) (err error)

type RemoteResponse

type RemoteResponse struct {
	Success bool
	Error   error
}

Remote RPC Types

type WriteRequest

type WriteRequest struct {
	File filesystem.File
	Data []byte
	Perm os.FileMode
}

type WriteResponse

type WriteResponse struct {
	RemoteResponse
}

Jump to

Keyboard shortcuts

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