set up requests from server side

This commit is contained in:
Barak Michener 2018-03-31 15:43:38 -07:00
parent a4f53875bc
commit 4015bc3896
3 changed files with 143 additions and 30 deletions

View file

@ -23,22 +23,34 @@ const (
MethodAccess
MethodOpen
MethodCreate
MethodFileRead
MethodFileWrite
MethodFileFlock
MethodFileRelease
MethodFileGetAttr
MethodFileFsync
MethodFileTruncate
MethodFileChown
MethodFileChmod
MethodFileAllocate
)
type Request struct {
ID int `json:"id"`
Method Method `json:"method"`
Path string `json:"path"`
Mode uint32
UID uint32
GID uint32
Size uint32
Dev int32
Flags uint32
Offset uint64
NewPath string `json:"newpath,omitempty"`
Attr string `json:"attr,omitempty"`
Data []byte `json:"data,omitempty"`
ID int `json:"id"`
Method Method `json:"method"`
Path string `json:"path"`
Mode uint32
UID uint32
GID uint32
Size uint32
Dev int32
Flags uint32
Offset int64
NewPath string `json:"newpath,omitempty"`
Attr string `json:"attr,omitempty"`
Data []byte `json:"data,omitempty"`
FileHandle int `json:"handle,omitempty"`
}
type RequestCallback struct {
@ -55,5 +67,6 @@ type Response struct {
Dirents []fuse.DirEntry `json:"dirents,omitempty"`
LinkStr string `json:"linkstr,omitempty"`
Statfs *fuse.StatfsOut `json:"statfs,omitempty"`
FileHandle *int `json:"filehandle,omitempty"`
FileHandle int `json:"filehandle,omitempty"`
WriteSize int `json:"wsize,omitempty"`
}