finish basic fs commands, stub out file on server side
This commit is contained in:
parent
8a91fdcb4e
commit
a4f53875bc
5 changed files with 294 additions and 19 deletions
29
request.go
29
request.go
|
|
@ -21,6 +21,8 @@ const (
|
|||
MethodLink
|
||||
MethodReadLink
|
||||
MethodAccess
|
||||
MethodOpen
|
||||
MethodCreate
|
||||
)
|
||||
|
||||
type Request struct {
|
||||
|
|
@ -28,12 +30,12 @@ type Request struct {
|
|||
Method Method `json:"method"`
|
||||
Path string `json:"path"`
|
||||
Mode uint32
|
||||
UID int32
|
||||
GID int32
|
||||
Size int32
|
||||
UID uint32
|
||||
GID uint32
|
||||
Size uint32
|
||||
Dev int32
|
||||
Flags int32
|
||||
Offset int64
|
||||
Flags uint32
|
||||
Offset uint64
|
||||
NewPath string `json:"newpath,omitempty"`
|
||||
Attr string `json:"attr,omitempty"`
|
||||
Data []byte `json:"data,omitempty"`
|
||||
|
|
@ -45,12 +47,13 @@ type RequestCallback struct {
|
|||
}
|
||||
|
||||
type Response struct {
|
||||
ID int `json:"id"`
|
||||
Code fuse.Status `json:"status"`
|
||||
Data []byte `json:"data,omitempty"`
|
||||
Stat *fuse.Attr `json:"stat,omitempty"`
|
||||
Attrs []string `json:"attrs,omitempty"`
|
||||
Dirents []fuse.DirEntry `json:"dirents,omitempty"`
|
||||
LinkStr string `json:"linkstr,omitempty"`
|
||||
Statfs *fuse.StatfsOut `json:"statfs,omitempty"`
|
||||
ID int `json:"id"`
|
||||
Code fuse.Status `json:"status"`
|
||||
Data []byte `json:"data,omitempty"`
|
||||
Stat *fuse.Attr `json:"stat,omitempty"`
|
||||
Attrs []string `json:"attrs,omitempty"`
|
||||
Dirents []fuse.DirEntry `json:"dirents,omitempty"`
|
||||
LinkStr string `json:"linkstr,omitempty"`
|
||||
Statfs *fuse.StatfsOut `json:"statfs,omitempty"`
|
||||
FileHandle *int `json:"filehandle,omitempty"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue