Documentation ¶
Index ¶
- Variables
- func RegisterFileSeverServer(s grpc.ServiceRegistrar, srv FileSeverServer)
- type Dir
- type File
- type FilePayload
- func (*FilePayload) Descriptor() ([]byte, []int)deprecated
- func (x *FilePayload) GetData() []byte
- func (m *FilePayload) GetInput() isFilePayload_Input
- func (x *FilePayload) GetPath() string
- func (*FilePayload) ProtoMessage()
- func (x *FilePayload) ProtoReflect() protoreflect.Message
- func (x *FilePayload) Reset()
- func (x *FilePayload) String() string
- type FilePayload_Data
- type FilePayload_Path
- type FileSeverClient
- type FileSeverServer
- type FileSever_ReadFileClient
- type FileSever_ReadFileServer
- type FileSever_WriteFileClient
- type FileSever_WriteFileServer
- type ListResponse
- func (*ListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListResponse) GetDirs() []*Dir
- func (x *ListResponse) GetFiles() []*File
- func (*ListResponse) ProtoMessage()
- func (x *ListResponse) ProtoReflect() protoreflect.Message
- func (x *ListResponse) Reset()
- func (x *ListResponse) String() string
- type Path
- type Payload
- type Status
- type StatusResponse
- func (*StatusResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StatusResponse) GetReason() string
- func (x *StatusResponse) GetStatus() Status
- func (*StatusResponse) ProtoMessage()
- func (x *StatusResponse) ProtoReflect() protoreflect.Message
- func (x *StatusResponse) Reset()
- func (x *StatusResponse) String() string
- type UnimplementedFileSeverServer
- func (UnimplementedFileSeverServer) CreateFile(context.Context, *Path) (*StatusResponse, error)
- func (UnimplementedFileSeverServer) ListDir(context.Context, *Path) (*ListResponse, error)
- func (UnimplementedFileSeverServer) MakeDir(context.Context, *Path) (*StatusResponse, error)
- func (UnimplementedFileSeverServer) ReadFile(*Path, FileSever_ReadFileServer) error
- func (UnimplementedFileSeverServer) Remove(context.Context, *Path) (*StatusResponse, error)
- func (UnimplementedFileSeverServer) WriteFile(FileSever_WriteFileServer) error
- type UnsafeFileSeverServer
Constants ¶
This section is empty.
Variables ¶
var ( Status_name = map[int32]string{ 0: "SUCCESS", 1: "FAILURE", } Status_value = map[string]int32{ "SUCCESS": 0, "FAILURE": 1, } )
Enum value maps for Status.
var FileSever_ServiceDesc = grpc.ServiceDesc{ ServiceName: "filesystem.FileSever", HandlerType: (*FileSeverServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListDir", Handler: _FileSever_ListDir_Handler, }, { MethodName: "MakeDir", Handler: _FileSever_MakeDir_Handler, }, { MethodName: "Remove", Handler: _FileSever_Remove_Handler, }, { MethodName: "CreateFile", Handler: _FileSever_CreateFile_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ReadFile", Handler: _FileSever_ReadFile_Handler, ServerStreams: true, }, { StreamName: "WriteFile", Handler: _FileSever_WriteFile_Handler, ClientStreams: true, }, }, Metadata: "filesystem.proto", }
FileSever_ServiceDesc is the grpc.ServiceDesc for FileSever service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_filesystem_proto protoreflect.FileDescriptor
Functions ¶
func RegisterFileSeverServer ¶
func RegisterFileSeverServer(s grpc.ServiceRegistrar, srv FileSeverServer)
Types ¶
type Dir ¶
type Dir struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` // contains filtered or unexported fields }
func (*Dir) Descriptor
deprecated
func (*Dir) ProtoMessage ¶
func (*Dir) ProtoMessage()
func (*Dir) ProtoReflect ¶
func (x *Dir) ProtoReflect() protoreflect.Message
type File ¶
type File struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` // contains filtered or unexported fields }
func (*File) Descriptor
deprecated
func (*File) ProtoMessage ¶
func (*File) ProtoMessage()
func (*File) ProtoReflect ¶
func (x *File) ProtoReflect() protoreflect.Message
type FilePayload ¶
type FilePayload struct { // Types that are assignable to Input: // *FilePayload_Path // *FilePayload_Data Input isFilePayload_Input `protobuf_oneof:"input"` // contains filtered or unexported fields }
func (*FilePayload) Descriptor
deprecated
func (*FilePayload) Descriptor() ([]byte, []int)
Deprecated: Use FilePayload.ProtoReflect.Descriptor instead.
func (*FilePayload) GetData ¶
func (x *FilePayload) GetData() []byte
func (*FilePayload) GetInput ¶
func (m *FilePayload) GetInput() isFilePayload_Input
func (*FilePayload) GetPath ¶
func (x *FilePayload) GetPath() string
func (*FilePayload) ProtoMessage ¶
func (*FilePayload) ProtoMessage()
func (*FilePayload) ProtoReflect ¶
func (x *FilePayload) ProtoReflect() protoreflect.Message
func (*FilePayload) Reset ¶
func (x *FilePayload) Reset()
func (*FilePayload) String ¶
func (x *FilePayload) String() string
type FilePayload_Data ¶
type FilePayload_Data struct {
Data []byte `protobuf:"bytes,2,opt,name=data,proto3,oneof"`
}
type FilePayload_Path ¶
type FilePayload_Path struct {
Path string `protobuf:"bytes,1,opt,name=path,proto3,oneof"`
}
type FileSeverClient ¶
type FileSeverClient interface { // Returns the list of files/dirs at path. ListDir(ctx context.Context, in *Path, opts ...grpc.CallOption) (*ListResponse, error) // Creates a directory at path. MakeDir(ctx context.Context, in *Path, opts ...grpc.CallOption) (*StatusResponse, error) // Removes a file/dir at path. Remove(ctx context.Context, in *Path, opts ...grpc.CallOption) (*StatusResponse, error) // Create a file at path. CreateFile(ctx context.Context, in *Path, opts ...grpc.CallOption) (*StatusResponse, error) // Returns file content as a stream of bytes. ReadFile(ctx context.Context, in *Path, opts ...grpc.CallOption) (FileSever_ReadFileClient, error) // A client-to-server streaming RPC. // WriteFile(ctx context.Context, opts ...grpc.CallOption) (FileSever_WriteFileClient, error) }
FileSeverClient is the client API for FileSever service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewFileSeverClient ¶
func NewFileSeverClient(cc grpc.ClientConnInterface) FileSeverClient
type FileSeverServer ¶
type FileSeverServer interface { // Returns the list of files/dirs at path. ListDir(context.Context, *Path) (*ListResponse, error) // Creates a directory at path. MakeDir(context.Context, *Path) (*StatusResponse, error) // Removes a file/dir at path. Remove(context.Context, *Path) (*StatusResponse, error) // Create a file at path. CreateFile(context.Context, *Path) (*StatusResponse, error) // Returns file content as a stream of bytes. ReadFile(*Path, FileSever_ReadFileServer) error // A client-to-server streaming RPC. // WriteFile(FileSever_WriteFileServer) error // contains filtered or unexported methods }
FileSeverServer is the server API for FileSever service. All implementations must embed UnimplementedFileSeverServer for forward compatibility
type FileSever_ReadFileClient ¶
type FileSever_ReadFileClient interface { Recv() (*Payload, error) grpc.ClientStream }
type FileSever_ReadFileServer ¶
type FileSever_ReadFileServer interface { Send(*Payload) error grpc.ServerStream }
type FileSever_WriteFileClient ¶
type FileSever_WriteFileClient interface { Send(*FilePayload) error CloseAndRecv() (*StatusResponse, error) grpc.ClientStream }
type FileSever_WriteFileServer ¶
type FileSever_WriteFileServer interface { SendAndClose(*StatusResponse) error Recv() (*FilePayload, error) grpc.ServerStream }
type ListResponse ¶
type ListResponse struct { Files []*File `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` Dirs []*Dir `protobuf:"bytes,2,rep,name=dirs,proto3" json:"dirs,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetDirs ¶
func (x *ListResponse) GetDirs() []*Dir
func (*ListResponse) GetFiles ¶
func (x *ListResponse) GetFiles() []*File
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
type Path ¶
type Path struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // contains filtered or unexported fields }
func (*Path) Descriptor
deprecated
func (*Path) ProtoMessage ¶
func (*Path) ProtoMessage()
func (*Path) ProtoReflect ¶
func (x *Path) ProtoReflect() protoreflect.Message
type Payload ¶
type Payload struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*Payload) Descriptor
deprecated
func (*Payload) ProtoMessage ¶
func (*Payload) ProtoMessage()
func (*Payload) ProtoReflect ¶
func (x *Payload) ProtoReflect() protoreflect.Message
type Status ¶
type Status int32
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
type StatusResponse ¶
type StatusResponse struct { Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=filesystem.Status" json:"status,omitempty"` Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` // contains filtered or unexported fields }
func (*StatusResponse) Descriptor
deprecated
func (*StatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.
func (*StatusResponse) GetReason ¶
func (x *StatusResponse) GetReason() string
func (*StatusResponse) GetStatus ¶
func (x *StatusResponse) GetStatus() Status
func (*StatusResponse) ProtoMessage ¶
func (*StatusResponse) ProtoMessage()
func (*StatusResponse) ProtoReflect ¶
func (x *StatusResponse) ProtoReflect() protoreflect.Message
func (*StatusResponse) Reset ¶
func (x *StatusResponse) Reset()
func (*StatusResponse) String ¶
func (x *StatusResponse) String() string
type UnimplementedFileSeverServer ¶
type UnimplementedFileSeverServer struct { }
UnimplementedFileSeverServer must be embedded to have forward compatible implementations.
func (UnimplementedFileSeverServer) CreateFile ¶
func (UnimplementedFileSeverServer) CreateFile(context.Context, *Path) (*StatusResponse, error)
func (UnimplementedFileSeverServer) ListDir ¶
func (UnimplementedFileSeverServer) ListDir(context.Context, *Path) (*ListResponse, error)
func (UnimplementedFileSeverServer) MakeDir ¶
func (UnimplementedFileSeverServer) MakeDir(context.Context, *Path) (*StatusResponse, error)
func (UnimplementedFileSeverServer) ReadFile ¶
func (UnimplementedFileSeverServer) ReadFile(*Path, FileSever_ReadFileServer) error
func (UnimplementedFileSeverServer) Remove ¶
func (UnimplementedFileSeverServer) Remove(context.Context, *Path) (*StatusResponse, error)
func (UnimplementedFileSeverServer) WriteFile ¶
func (UnimplementedFileSeverServer) WriteFile(FileSever_WriteFileServer) error
type UnsafeFileSeverServer ¶
type UnsafeFileSeverServer interface {
// contains filtered or unexported methods
}
UnsafeFileSeverServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FileSeverServer will result in compilation errors.