protocol

package
v0.0.0-...-dcd4b28 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Types

type CloseFileRequest

type CloseFileRequest struct {
	FileHandle uint64
}

type CreateDirectoryRequest

type CreateDirectoryRequest struct {
	Path string
	Mode uint32
}

type CreateFileRequest

type CreateFileRequest struct {
	Path string
}

type DeleteDirectoryRequest

type DeleteDirectoryRequest struct {
	Path string
}

type DeleteFileRequest

type DeleteFileRequest struct {
	Path string
}

type EmptyResponse

type EmptyResponse struct{}

type FileInfo

type FileInfo struct {
	Name    string      // base name of the file
	Size    int64       // length in bytes for regular files; system-dependent for others
	Mode    os.FileMode // file mode bits
	ModTime time.Time   // modification time
	IsDir   bool        // abbreviation for Mode().IsDir()
}

type GetFileAttributesRequest

type GetFileAttributesRequest struct {
	Path       string
	FileHandle uint64
}

type GetFileAttributesResponse

type GetFileAttributesResponse struct {
	FileInfo FileInfo
}

type Message

type Message struct {
	MessageID  uint32
	IsResponse bool
	Data       interface{}
	Success    bool
}

type OpenFileRequest

type OpenFileRequest struct {
	Path  string
	Flags int
}

type OpenFileResponse

type OpenFileResponse struct {
	FileHandle uint64
}

type ReadDirectoryRequest

type ReadDirectoryRequest struct {
	Path string
}

type ReadDirectoryResponse

type ReadDirectoryResponse struct {
	Files []FileInfo
}

type ReadFileRequest

type ReadFileRequest struct {
	FileHandle uint64
	Offset     int64
	Size       int
}

type ReadFileResponse

type ReadFileResponse struct {
	Data      []byte
	BytesRead int
}

type RenameRequest

type RenameRequest struct {
	OldPath string
	NewPath string
}

type TruncateRequest

type TruncateRequest struct {
	Path       string
	FileHandle uint64
	Size       int64
}

type WriteFileRequest

type WriteFileRequest struct {
	FileHandle uint64
	Offset     int64
	Data       []byte
}

type WriteFileResponse

type WriteFileResponse struct {
	BytesWritten int
}

Jump to

Keyboard shortcuts

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