218 lines
4.2 KiB
Protocol Buffer
218 lines
4.2 KiB
Protocol Buffer
// Copyright 2015 gRPC authors.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
syntax = "proto3";
|
|
|
|
package lws_vfs;
|
|
|
|
service LwsVfs {
|
|
// Sends a greeting
|
|
rpc SayHello(HelloRequest) returns (HelloReply) {}
|
|
|
|
rpc fgetattr(getattr) returns (getattr) {}
|
|
rpc fsetxattr(setxattr) returns (setxattr) {}
|
|
rpc faccess(access) returns (access) {}
|
|
rpc freaddir(readdir) returns (readdir) {}
|
|
rpc fread(read) returns (read) {}
|
|
rpc fopen(open) returns (open) {}
|
|
rpc fwrite(write) returns (write) {}
|
|
rpc fgetxattr(getxattr) returns (getxattr) {}
|
|
rpc ftruncate(truncate) returns (truncate) {}
|
|
rpc futimens(utimens) returns (utimens) {}
|
|
rpc fchown(chown) returns (chown) {}
|
|
rpc frelease(release) returns (release) {}
|
|
rpc fmkdir(mkdir) returns (mkdir) {}
|
|
rpc frmdir(rmdir) returns (rmdir) {}
|
|
rpc fflush(flush) returns (flush) {}
|
|
rpc fopendir(opendir) returns (opendir) {}
|
|
rpc freleasedir(releasedir) returns (releasedir) {}
|
|
rpc fcreate(create) returns (create) {}
|
|
rpc funlink(unlink) returns (unlink) {}
|
|
rpc frename(rename) returns (rename) {}
|
|
}
|
|
|
|
// The request message containing the user's name.
|
|
message HelloRequest { string name = 1; }
|
|
|
|
// The response message containing the greetings
|
|
message HelloReply { string message = 1; }
|
|
|
|
message file_info {
|
|
uint32 flags = 1;
|
|
uint32 fh_old = 2;
|
|
bool direct_io = 3;
|
|
uint64 fh = 10;
|
|
uint64 lock_owner = 11;
|
|
}
|
|
|
|
message fstat {
|
|
uint64 fst_mode = 1;
|
|
uint64 fst_ino = 2;
|
|
uint64 fst_dev = 3;
|
|
uint64 fst_rdev = 4;
|
|
uint64 fst_nlink = 5;
|
|
uint64 fst_uid = 6;
|
|
uint64 fst_gid = 7;
|
|
uint64 fst_size = 8;
|
|
uint64 fst_atime = 9;
|
|
uint64 fst_mtime = 10;
|
|
uint64 fst_ctime = 11;
|
|
uint64 fst_blksize = 12;
|
|
uint64 fst_blocks = 13;
|
|
}
|
|
|
|
// fuse api function message define:
|
|
message getattr {
|
|
string path = 1;
|
|
fstat stat = 2;
|
|
file_info fi = 3;
|
|
int32 ret = 15;
|
|
}
|
|
|
|
message setxattr {
|
|
string path = 1;
|
|
string name = 2;
|
|
bytes value = 3;
|
|
int64 size = 4;
|
|
uint32 flags = 5;
|
|
int32 ret = 15;
|
|
}
|
|
message getxattr {
|
|
string path = 1;
|
|
string name = 2;
|
|
bytes value = 3;
|
|
int64 size = 4;
|
|
int32 ret = 15;
|
|
}
|
|
|
|
message access {
|
|
string path = 1;
|
|
uint32 mask = 2;
|
|
int32 ret = 15;
|
|
}
|
|
|
|
message direntry {
|
|
string name = 1;
|
|
uint32 kind = 2;
|
|
}
|
|
|
|
message readdir {
|
|
string path = 1;
|
|
repeated direntry dirs = 2;
|
|
uint32 offset = 3;
|
|
file_info fi = 4;
|
|
int32 ret = 15;
|
|
}
|
|
|
|
message open {
|
|
string path = 1;
|
|
file_info fi = 2;
|
|
int32 ret = 15;
|
|
}
|
|
|
|
message read {
|
|
string path = 1;
|
|
bytes buff = 2;
|
|
int64 size = 3;
|
|
uint64 offset = 4;
|
|
file_info fi = 5;
|
|
int32 ret = 15;
|
|
}
|
|
|
|
message write {
|
|
string path = 1;
|
|
bytes buff = 2;
|
|
uint64 size = 3;
|
|
uint64 offset = 4;
|
|
file_info fi = 5;
|
|
int32 ret = 15;
|
|
}
|
|
|
|
message truncate {
|
|
string path = 1;
|
|
int64 size = 3;
|
|
int32 ret = 15;
|
|
}
|
|
|
|
message timespec {
|
|
int32 tv_sec = 1;
|
|
int64 tv_nsec = 2;
|
|
}
|
|
message utimens {
|
|
string path = 1;
|
|
repeated timespec ts = 2; // const struct timespec ts[2]
|
|
int32 ret = 15;
|
|
}
|
|
|
|
message chown {
|
|
string path = 1;
|
|
int32 uid = 2;
|
|
int32 gid = 3;
|
|
int32 ret = 15;
|
|
}
|
|
|
|
message release {
|
|
string path = 1;
|
|
file_info fi = 2;
|
|
uint32 flush = 3;
|
|
int32 ret = 15;
|
|
}
|
|
|
|
message mkdir {
|
|
string path = 1;
|
|
file_info fi = 2;
|
|
uint32 mode = 3;
|
|
int32 ret = 15;
|
|
}
|
|
|
|
message rmdir {
|
|
string path = 1;
|
|
int32 ret = 15;
|
|
}
|
|
|
|
message flush {
|
|
string path = 1;
|
|
file_info fi = 2;
|
|
int32 ret = 15;
|
|
}
|
|
|
|
message opendir {
|
|
string path = 1;
|
|
file_info fi = 2;
|
|
int32 ret = 15;
|
|
}
|
|
|
|
message releasedir {
|
|
string path = 1;
|
|
file_info fi = 2;
|
|
int32 ret = 15;
|
|
}
|
|
|
|
message create {
|
|
string path = 1;
|
|
uint32 mode = 2;
|
|
file_info fi = 3;
|
|
int32 ret = 15;
|
|
}
|
|
|
|
message unlink {
|
|
string path = 1;
|
|
int32 ret = 15;
|
|
}
|
|
|
|
message rename {
|
|
string path = 1;
|
|
string new = 2;
|
|
int32 ret = 15;
|
|
} |