Documentation ¶
Overview ¶
Package localfile defines the RPC interface for the sansshell LocalFile actions.
Index ¶
- Variables
- func RegisterLocalFileServer(s grpc.ServiceRegistrar, srv LocalFileServer)
- type CopyManyResponse
- type CopyRequest
- func (*CopyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CopyRequest) GetBlobData() []byte
- func (x *CopyRequest) GetBucket() string
- func (x *CopyRequest) GetDestination() *FileWrite
- func (x *CopyRequest) GetKey() string
- func (*CopyRequest) ProtoMessage()
- func (x *CopyRequest) ProtoReflect() protoreflect.Message
- func (x *CopyRequest) Reset()
- func (x *CopyRequest) String() string
- type FileAttribute
- func (*FileAttribute) Descriptor() ([]byte, []int)deprecated
- func (x *FileAttribute) GetGid() uint32
- func (x *FileAttribute) GetGroup() string
- func (x *FileAttribute) GetImmutable() bool
- func (x *FileAttribute) GetMode() uint32
- func (x *FileAttribute) GetUid() uint32
- func (x *FileAttribute) GetUsername() string
- func (m *FileAttribute) GetValue() isFileAttribute_Value
- func (*FileAttribute) ProtoMessage()
- func (x *FileAttribute) ProtoReflect() protoreflect.Message
- func (x *FileAttribute) Reset()
- func (x *FileAttribute) String() string
- type FileAttribute_Gid
- type FileAttribute_Group
- type FileAttribute_Immutable
- type FileAttribute_Mode
- type FileAttribute_Uid
- type FileAttribute_Username
- type FileAttributes
- func (*FileAttributes) Descriptor() ([]byte, []int)deprecated
- func (x *FileAttributes) GetAttributes() []*FileAttribute
- func (x *FileAttributes) GetFilename() string
- func (*FileAttributes) ProtoMessage()
- func (x *FileAttributes) ProtoReflect() protoreflect.Message
- func (x *FileAttributes) Reset()
- func (x *FileAttributes) String() string
- type FileWrite
- type ListManyResponse
- type ListReply
- type ListRequest
- type LocalFileClient
- type LocalFileClientProxy
- type LocalFileServer
- type LocalFile_ListClient
- type LocalFile_ListClientProxy
- type LocalFile_ListServer
- type LocalFile_ReadClient
- type LocalFile_ReadClientProxy
- type LocalFile_ReadServer
- type LocalFile_StatClient
- type LocalFile_StatClientProxy
- type LocalFile_StatServer
- type LocalFile_SumClient
- type LocalFile_SumClientProxy
- type LocalFile_SumServer
- type LocalFile_WriteClient
- type LocalFile_WriteClientProxy
- type LocalFile_WriteServer
- type ReadActionRequest
- func (*ReadActionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReadActionRequest) GetFile() *ReadRequest
- func (m *ReadActionRequest) GetRequest() isReadActionRequest_Request
- func (x *ReadActionRequest) GetTail() *TailRequest
- func (*ReadActionRequest) ProtoMessage()
- func (x *ReadActionRequest) ProtoReflect() protoreflect.Message
- func (x *ReadActionRequest) Reset()
- func (x *ReadActionRequest) String() string
- type ReadActionRequest_File
- type ReadActionRequest_Tail
- type ReadManyResponse
- type ReadReply
- type ReadRequest
- func (*ReadRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReadRequest) GetFilename() string
- func (x *ReadRequest) GetLength() int64
- func (x *ReadRequest) GetOffset() int64
- func (*ReadRequest) ProtoMessage()
- func (x *ReadRequest) ProtoReflect() protoreflect.Message
- func (x *ReadRequest) Reset()
- func (x *ReadRequest) String() string
- type RenameManyResponse
- type RenameRequest
- func (*RenameRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RenameRequest) GetDestinationName() string
- func (x *RenameRequest) GetOriginalName() string
- func (*RenameRequest) ProtoMessage()
- func (x *RenameRequest) ProtoReflect() protoreflect.Message
- func (x *RenameRequest) Reset()
- func (x *RenameRequest) String() string
- type RmManyResponse
- type RmRequest
- type RmdirManyResponse
- type RmdirRequest
- type SetFileAttributesManyResponse
- type SetFileAttributesRequest
- func (*SetFileAttributesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetFileAttributesRequest) GetAttrs() *FileAttributes
- func (*SetFileAttributesRequest) ProtoMessage()
- func (x *SetFileAttributesRequest) ProtoReflect() protoreflect.Message
- func (x *SetFileAttributesRequest) Reset()
- func (x *SetFileAttributesRequest) String() string
- type StatManyResponse
- type StatReply
- func (*StatReply) Descriptor() ([]byte, []int)deprecated
- func (x *StatReply) GetFilename() string
- func (x *StatReply) GetGid() uint32
- func (x *StatReply) GetImmutable() bool
- func (x *StatReply) GetMode() uint32
- func (x *StatReply) GetModtime() *timestamppb.Timestamp
- func (x *StatReply) GetSize() int64
- func (x *StatReply) GetUid() uint32
- func (*StatReply) ProtoMessage()
- func (x *StatReply) ProtoReflect() protoreflect.Message
- func (x *StatReply) Reset()
- func (x *StatReply) String() string
- type StatRequest
- type SumManyResponse
- type SumReply
- func (*SumReply) Descriptor() ([]byte, []int)deprecated
- func (x *SumReply) GetFilename() string
- func (x *SumReply) GetSum() string
- func (x *SumReply) GetSumType() SumType
- func (*SumReply) ProtoMessage()
- func (x *SumReply) ProtoReflect() protoreflect.Message
- func (x *SumReply) Reset()
- func (x *SumReply) String() string
- type SumRequest
- type SumType
- type TailRequest
- func (*TailRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TailRequest) GetFilename() string
- func (x *TailRequest) GetOffset() int64
- func (*TailRequest) ProtoMessage()
- func (x *TailRequest) ProtoReflect() protoreflect.Message
- func (x *TailRequest) Reset()
- func (x *TailRequest) String() string
- type UnimplementedLocalFileServer
- func (UnimplementedLocalFileServer) Copy(context.Context, *CopyRequest) (*emptypb.Empty, error)
- func (UnimplementedLocalFileServer) List(*ListRequest, LocalFile_ListServer) error
- func (UnimplementedLocalFileServer) Read(*ReadActionRequest, LocalFile_ReadServer) error
- func (UnimplementedLocalFileServer) Rename(context.Context, *RenameRequest) (*emptypb.Empty, error)
- func (UnimplementedLocalFileServer) Rm(context.Context, *RmRequest) (*emptypb.Empty, error)
- func (UnimplementedLocalFileServer) Rmdir(context.Context, *RmdirRequest) (*emptypb.Empty, error)
- func (UnimplementedLocalFileServer) SetFileAttributes(context.Context, *SetFileAttributesRequest) (*emptypb.Empty, error)
- func (UnimplementedLocalFileServer) Stat(LocalFile_StatServer) error
- func (UnimplementedLocalFileServer) Sum(LocalFile_SumServer) error
- func (UnimplementedLocalFileServer) Write(LocalFile_WriteServer) error
- type UnsafeLocalFileServer
- type WriteManyResponse
- type WriteRequest
- func (*WriteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WriteRequest) GetContents() []byte
- func (x *WriteRequest) GetDescription() *FileWrite
- func (m *WriteRequest) GetRequest() isWriteRequest_Request
- func (*WriteRequest) ProtoMessage()
- func (x *WriteRequest) ProtoReflect() protoreflect.Message
- func (x *WriteRequest) Reset()
- func (x *WriteRequest) String() string
- type WriteRequest_Contents
- type WriteRequest_Description
Constants ¶
This section is empty.
Variables ¶
var ( SumType_name = map[int32]string{ 0: "SUM_TYPE_UNKNOWN", 1: "SUM_TYPE_CRC32IEEE", 2: "SUM_TYPE_MD5", 3: "SUM_TYPE_SHA256", 4: "SUM_TYPE_SHA512_256", } SumType_value = map[string]int32{ "SUM_TYPE_UNKNOWN": 0, "SUM_TYPE_CRC32IEEE": 1, "SUM_TYPE_MD5": 2, "SUM_TYPE_SHA256": 3, "SUM_TYPE_SHA512_256": 4, } )
Enum value maps for SumType.
var File_localfile_proto protoreflect.FileDescriptor
var LocalFile_ServiceDesc = grpc.ServiceDesc{ ServiceName: "LocalFile.LocalFile", HandlerType: (*LocalFileServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Copy", Handler: _LocalFile_Copy_Handler, }, { MethodName: "SetFileAttributes", Handler: _LocalFile_SetFileAttributes_Handler, }, { MethodName: "Rm", Handler: _LocalFile_Rm_Handler, }, { MethodName: "Rmdir", Handler: _LocalFile_Rmdir_Handler, }, { MethodName: "Rename", Handler: _LocalFile_Rename_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Read", Handler: _LocalFile_Read_Handler, ServerStreams: true, }, { StreamName: "Stat", Handler: _LocalFile_Stat_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "Sum", Handler: _LocalFile_Sum_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "Write", Handler: _LocalFile_Write_Handler, ClientStreams: true, }, { StreamName: "List", Handler: _LocalFile_List_Handler, ServerStreams: true, }, }, Metadata: "localfile.proto", }
LocalFile_ServiceDesc is the grpc.ServiceDesc for LocalFile service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLocalFileServer ¶
func RegisterLocalFileServer(s grpc.ServiceRegistrar, srv LocalFileServer)
Types ¶
type CopyManyResponse ¶
type CopyManyResponse struct { Target string // As targets can be duplicated this is the index into the slice passed to proxy.Conn. Index int Resp *emptypb.Empty Error error }
CopyManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.
type CopyRequest ¶
type CopyRequest struct { Destination *FileWrite `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` // The source bucket to copy from. See implementations for details on schemes // but will at a minimum support file://<path> for local copies. Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"` // The key to reference inside of the bucket. Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // Any additional data the URL destination may need in order // to succeed (such as an auth token for a blob service). BlobData []byte `protobuf:"bytes,4,opt,name=blob_data,json=blobData,proto3" json:"blob_data,omitempty"` // contains filtered or unexported fields }
CopyRequest contains the URL and filename destination to copy the file from.
func (*CopyRequest) Descriptor
deprecated
func (*CopyRequest) Descriptor() ([]byte, []int)
Deprecated: Use CopyRequest.ProtoReflect.Descriptor instead.
func (*CopyRequest) GetBlobData ¶
func (x *CopyRequest) GetBlobData() []byte
func (*CopyRequest) GetBucket ¶
func (x *CopyRequest) GetBucket() string
func (*CopyRequest) GetDestination ¶
func (x *CopyRequest) GetDestination() *FileWrite
func (*CopyRequest) GetKey ¶
func (x *CopyRequest) GetKey() string
func (*CopyRequest) ProtoMessage ¶
func (*CopyRequest) ProtoMessage()
func (*CopyRequest) ProtoReflect ¶
func (x *CopyRequest) ProtoReflect() protoreflect.Message
func (*CopyRequest) Reset ¶
func (x *CopyRequest) Reset()
func (*CopyRequest) String ¶
func (x *CopyRequest) String() string
type FileAttribute ¶
type FileAttribute struct { // Types that are assignable to Value: // *FileAttribute_Uid // *FileAttribute_Username // *FileAttribute_Gid // *FileAttribute_Group // *FileAttribute_Mode // *FileAttribute_Immutable Value isFileAttribute_Value `protobuf_oneof:"value"` // contains filtered or unexported fields }
FileAttributes describes a file/directory and an attributed of it. It's used together with repeated fields and a path to describe an entire entity.
func (*FileAttribute) Descriptor
deprecated
func (*FileAttribute) Descriptor() ([]byte, []int)
Deprecated: Use FileAttribute.ProtoReflect.Descriptor instead.
func (*FileAttribute) GetGid ¶
func (x *FileAttribute) GetGid() uint32
func (*FileAttribute) GetGroup ¶ added in v1.0.10
func (x *FileAttribute) GetGroup() string
func (*FileAttribute) GetImmutable ¶
func (x *FileAttribute) GetImmutable() bool
func (*FileAttribute) GetMode ¶
func (x *FileAttribute) GetMode() uint32
func (*FileAttribute) GetUid ¶
func (x *FileAttribute) GetUid() uint32
func (*FileAttribute) GetUsername ¶ added in v1.0.10
func (x *FileAttribute) GetUsername() string
func (*FileAttribute) GetValue ¶
func (m *FileAttribute) GetValue() isFileAttribute_Value
func (*FileAttribute) ProtoMessage ¶
func (*FileAttribute) ProtoMessage()
func (*FileAttribute) ProtoReflect ¶
func (x *FileAttribute) ProtoReflect() protoreflect.Message
func (*FileAttribute) Reset ¶
func (x *FileAttribute) Reset()
func (*FileAttribute) String ¶
func (x *FileAttribute) String() string
type FileAttribute_Gid ¶
type FileAttribute_Gid struct {
Gid uint32 `protobuf:"varint,2,opt,name=gid,proto3,oneof"`
}
type FileAttribute_Group ¶ added in v1.0.10
type FileAttribute_Group struct {
Group string `protobuf:"bytes,6,opt,name=group,proto3,oneof"` // Use in place of gid and server will lookup.
}
type FileAttribute_Immutable ¶
type FileAttribute_Immutable struct {
Immutable bool `protobuf:"varint,4,opt,name=immutable,proto3,oneof"`
}
type FileAttribute_Mode ¶
type FileAttribute_Mode struct { // Only the lower 12 bits are used per unix conventions. Mode uint32 `protobuf:"varint,3,opt,name=mode,proto3,oneof"` }
type FileAttribute_Uid ¶
type FileAttribute_Uid struct {
Uid uint32 `protobuf:"varint,1,opt,name=uid,proto3,oneof"`
}
type FileAttribute_Username ¶ added in v1.0.10
type FileAttribute_Username struct {
Username string `protobuf:"bytes,5,opt,name=username,proto3,oneof"` // Use in place of uid and server will lookup.
}
type FileAttributes ¶
type FileAttributes struct { Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` // A given attributes (uid, gid, etc) can only be set once. Attributes []*FileAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"` // contains filtered or unexported fields }
FileAttributes describes everything about a given file/directory.
func (*FileAttributes) Descriptor
deprecated
func (*FileAttributes) Descriptor() ([]byte, []int)
Deprecated: Use FileAttributes.ProtoReflect.Descriptor instead.
func (*FileAttributes) GetAttributes ¶
func (x *FileAttributes) GetAttributes() []*FileAttribute
func (*FileAttributes) GetFilename ¶
func (x *FileAttributes) GetFilename() string
func (*FileAttributes) ProtoMessage ¶
func (*FileAttributes) ProtoMessage()
func (*FileAttributes) ProtoReflect ¶
func (x *FileAttributes) ProtoReflect() protoreflect.Message
func (*FileAttributes) Reset ¶
func (x *FileAttributes) Reset()
func (*FileAttributes) String ¶
func (x *FileAttributes) String() string
type FileWrite ¶
type FileWrite struct { // For a newly written file uid/gid/mode are required attributes // while immutable is optional. Attrs *FileAttributes `protobuf:"bytes,1,opt,name=attrs,proto3" json:"attrs,omitempty"` // If true allow to truncate and overwrite an existing file. Otherwise // the file must not exist. This is still subject to races as all incoming // data is written to a tempfile before moved to the final destination so // multiple system calls will take place. Overwrite bool `protobuf:"varint,2,opt,name=overwrite,proto3" json:"overwrite,omitempty"` // contains filtered or unexported fields }
FileWrite describes everything about a file to be written.
func (*FileWrite) Descriptor
deprecated
func (*FileWrite) GetAttrs ¶
func (x *FileWrite) GetAttrs() *FileAttributes
func (*FileWrite) GetOverwrite ¶
func (*FileWrite) ProtoMessage ¶
func (*FileWrite) ProtoMessage()
func (*FileWrite) ProtoReflect ¶
func (x *FileWrite) ProtoReflect() protoreflect.Message
type ListManyResponse ¶
type ListManyResponse struct { Target string // As targets can be duplicated this is the index into the slice passed to proxy.Conn. Index int Resp *ListReply Error error }
ListManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.
type ListReply ¶
type ListReply struct { Entry *StatReply `protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"` // contains filtered or unexported fields }
ListReply will begin with the entry followed by N entries (if a directory) until that level of the tree is exhausted.
func (*ListReply) Descriptor
deprecated
func (*ListReply) ProtoMessage ¶
func (*ListReply) ProtoMessage()
func (*ListReply) ProtoReflect ¶
func (x *ListReply) ProtoReflect() protoreflect.Message
type ListRequest ¶
type ListRequest struct { // The entry to list. Entry string `protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"` // contains filtered or unexported fields }
ListRequest will do an expansion on the entry given to list all things located there. If entry is a file only that data will be returned.
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetEntry ¶
func (x *ListRequest) GetEntry() string
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
type LocalFileClient ¶
type LocalFileClient interface { // Read reads a file from the disk and returns it contents. Read(ctx context.Context, in *ReadActionRequest, opts ...grpc.CallOption) (LocalFile_ReadClient, error) // Stat returns metadata about a filesytem path. Stat(ctx context.Context, opts ...grpc.CallOption) (LocalFile_StatClient, error) // Sum calculates a sum over the data in a single file. Sum(ctx context.Context, opts ...grpc.CallOption) (LocalFile_SumClient, error) // Write writes a file from the incoming RPC to a local file. Write(ctx context.Context, opts ...grpc.CallOption) (LocalFile_WriteClient, error) // Copy retrieves a file from the given blob URL and writes it to a local // file. Copy(ctx context.Context, in *CopyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // List returns StatReply entries for the entities contained at a given path. List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (LocalFile_ListClient, error) // SetFileAttributes takes a given filename and sets the given attributes. SetFileAttributes(ctx context.Context, in *SetFileAttributesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Rm removes the given file. Rm(ctx context.Context, in *RmRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Rmdir removes the given directory (must be empty). Rmdir(ctx context.Context, in *RmdirRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Rename renames (moves) the given file to a new name. If the destination // is not a directory it will be replaced if it already exists. // OS restrictions may apply if the old and new names are outside of the same // directory. Rename(ctx context.Context, in *RenameRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
LocalFileClient is the client API for LocalFile 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 NewLocalFileClient ¶
func NewLocalFileClient(cc grpc.ClientConnInterface) LocalFileClient
type LocalFileClientProxy ¶
type LocalFileClientProxy interface { LocalFileClient ReadOneMany(ctx context.Context, in *ReadActionRequest, opts ...grpc.CallOption) (LocalFile_ReadClientProxy, error) StatOneMany(ctx context.Context, opts ...grpc.CallOption) (LocalFile_StatClientProxy, error) SumOneMany(ctx context.Context, opts ...grpc.CallOption) (LocalFile_SumClientProxy, error) WriteOneMany(ctx context.Context, opts ...grpc.CallOption) (LocalFile_WriteClientProxy, error) CopyOneMany(ctx context.Context, in *CopyRequest, opts ...grpc.CallOption) (<-chan *CopyManyResponse, error) ListOneMany(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (LocalFile_ListClientProxy, error) SetFileAttributesOneMany(ctx context.Context, in *SetFileAttributesRequest, opts ...grpc.CallOption) (<-chan *SetFileAttributesManyResponse, error) RmOneMany(ctx context.Context, in *RmRequest, opts ...grpc.CallOption) (<-chan *RmManyResponse, error) RmdirOneMany(ctx context.Context, in *RmdirRequest, opts ...grpc.CallOption) (<-chan *RmdirManyResponse, error) RenameOneMany(ctx context.Context, in *RenameRequest, opts ...grpc.CallOption) (<-chan *RenameManyResponse, error) }
LocalFileClientProxy is the superset of LocalFileClient which additionally includes the OneMany proxy methods
func NewLocalFileClientProxy ¶
func NewLocalFileClientProxy(cc *proxy.Conn) LocalFileClientProxy
NewLocalFileClientProxy creates a LocalFileClientProxy for use in proxied connections. NOTE: This takes a proxy.Conn instead of a generic ClientConnInterface as the methods here are only valid in proxy.Conn contexts.
type LocalFileServer ¶
type LocalFileServer interface { // Read reads a file from the disk and returns it contents. Read(*ReadActionRequest, LocalFile_ReadServer) error // Stat returns metadata about a filesytem path. Stat(LocalFile_StatServer) error // Sum calculates a sum over the data in a single file. Sum(LocalFile_SumServer) error // Write writes a file from the incoming RPC to a local file. Write(LocalFile_WriteServer) error // Copy retrieves a file from the given blob URL and writes it to a local // file. Copy(context.Context, *CopyRequest) (*emptypb.Empty, error) // List returns StatReply entries for the entities contained at a given path. List(*ListRequest, LocalFile_ListServer) error // SetFileAttributes takes a given filename and sets the given attributes. SetFileAttributes(context.Context, *SetFileAttributesRequest) (*emptypb.Empty, error) // Rm removes the given file. Rm(context.Context, *RmRequest) (*emptypb.Empty, error) // Rmdir removes the given directory (must be empty). Rmdir(context.Context, *RmdirRequest) (*emptypb.Empty, error) // Rename renames (moves) the given file to a new name. If the destination // is not a directory it will be replaced if it already exists. // OS restrictions may apply if the old and new names are outside of the same // directory. Rename(context.Context, *RenameRequest) (*emptypb.Empty, error) }
LocalFileServer is the server API for LocalFile service. All implementations should embed UnimplementedLocalFileServer for forward compatibility
type LocalFile_ListClient ¶
type LocalFile_ListClient interface { Recv() (*ListReply, error) grpc.ClientStream }
type LocalFile_ListClientProxy ¶
type LocalFile_ListClientProxy interface { Recv() ([]*ListManyResponse, error) grpc.ClientStream }
type LocalFile_ListServer ¶
type LocalFile_ListServer interface { Send(*ListReply) error grpc.ServerStream }
type LocalFile_ReadClient ¶
type LocalFile_ReadClient interface { Recv() (*ReadReply, error) grpc.ClientStream }
type LocalFile_ReadClientProxy ¶
type LocalFile_ReadClientProxy interface { Recv() ([]*ReadManyResponse, error) grpc.ClientStream }
type LocalFile_ReadServer ¶
type LocalFile_ReadServer interface { Send(*ReadReply) error grpc.ServerStream }
type LocalFile_StatClient ¶
type LocalFile_StatClient interface { Send(*StatRequest) error Recv() (*StatReply, error) grpc.ClientStream }
type LocalFile_StatClientProxy ¶
type LocalFile_StatClientProxy interface { Send(*StatRequest) error Recv() ([]*StatManyResponse, error) grpc.ClientStream }
type LocalFile_StatServer ¶
type LocalFile_StatServer interface { Send(*StatReply) error Recv() (*StatRequest, error) grpc.ServerStream }
type LocalFile_SumClient ¶
type LocalFile_SumClient interface { Send(*SumRequest) error Recv() (*SumReply, error) grpc.ClientStream }
type LocalFile_SumClientProxy ¶
type LocalFile_SumClientProxy interface { Send(*SumRequest) error Recv() ([]*SumManyResponse, error) grpc.ClientStream }
type LocalFile_SumServer ¶
type LocalFile_SumServer interface { Send(*SumReply) error Recv() (*SumRequest, error) grpc.ServerStream }
type LocalFile_WriteClient ¶
type LocalFile_WriteClient interface { Send(*WriteRequest) error CloseAndRecv() (*emptypb.Empty, error) grpc.ClientStream }
type LocalFile_WriteClientProxy ¶
type LocalFile_WriteClientProxy interface { Send(*WriteRequest) error CloseAndRecv() ([]*WriteManyResponse, error) grpc.ClientStream }
type LocalFile_WriteServer ¶
type LocalFile_WriteServer interface { SendAndClose(*emptypb.Empty) error Recv() (*WriteRequest, error) grpc.ServerStream }
type ReadActionRequest ¶
type ReadActionRequest struct { // Types that are assignable to Request: // *ReadActionRequest_File // *ReadActionRequest_Tail Request isReadActionRequest_Request `protobuf_oneof:"request"` // contains filtered or unexported fields }
ReadActionRequest indicates the type of read we're performing. Either a file read which then terminates or a tail based read that continues forever (i.e. as tail -f on the command line would do).
func (*ReadActionRequest) Descriptor
deprecated
func (*ReadActionRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReadActionRequest.ProtoReflect.Descriptor instead.
func (*ReadActionRequest) GetFile ¶
func (x *ReadActionRequest) GetFile() *ReadRequest
func (*ReadActionRequest) GetRequest ¶
func (m *ReadActionRequest) GetRequest() isReadActionRequest_Request
func (*ReadActionRequest) GetTail ¶
func (x *ReadActionRequest) GetTail() *TailRequest
func (*ReadActionRequest) ProtoMessage ¶
func (*ReadActionRequest) ProtoMessage()
func (*ReadActionRequest) ProtoReflect ¶
func (x *ReadActionRequest) ProtoReflect() protoreflect.Message
func (*ReadActionRequest) Reset ¶
func (x *ReadActionRequest) Reset()
func (*ReadActionRequest) String ¶
func (x *ReadActionRequest) String() string
type ReadActionRequest_File ¶
type ReadActionRequest_File struct {
File *ReadRequest `protobuf:"bytes,1,opt,name=file,proto3,oneof"`
}
type ReadActionRequest_Tail ¶
type ReadActionRequest_Tail struct {
Tail *TailRequest `protobuf:"bytes,2,opt,name=tail,proto3,oneof"`
}
type ReadManyResponse ¶
type ReadManyResponse struct { Target string // As targets can be duplicated this is the index into the slice passed to proxy.Conn. Index int Resp *ReadReply Error error }
ReadManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.
type ReadReply ¶
type ReadReply struct { Contents []byte `protobuf:"bytes,1,opt,name=contents,proto3" json:"contents,omitempty"` // contains filtered or unexported fields }
ReadResponse contains the contents of the file
func (*ReadReply) Descriptor
deprecated
func (*ReadReply) GetContents ¶
func (*ReadReply) ProtoMessage ¶
func (*ReadReply) ProtoMessage()
func (*ReadReply) ProtoReflect ¶
func (x *ReadReply) ProtoReflect() protoreflect.Message
type ReadRequest ¶
type ReadRequest struct { Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` // If non-zero skip N bytes into the file before returning data. // Negative implies based from end of file. Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` // If positive and non-zero return only this many total bytes. Length int64 `protobuf:"varint,3,opt,name=length,proto3" json:"length,omitempty"` // contains filtered or unexported fields }
ReadRequest describes the filename to be read
func (*ReadRequest) Descriptor
deprecated
func (*ReadRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.
func (*ReadRequest) GetFilename ¶
func (x *ReadRequest) GetFilename() string
func (*ReadRequest) GetLength ¶
func (x *ReadRequest) GetLength() int64
func (*ReadRequest) GetOffset ¶
func (x *ReadRequest) GetOffset() int64
func (*ReadRequest) ProtoMessage ¶
func (*ReadRequest) ProtoMessage()
func (*ReadRequest) ProtoReflect ¶
func (x *ReadRequest) ProtoReflect() protoreflect.Message
func (*ReadRequest) Reset ¶
func (x *ReadRequest) Reset()
func (*ReadRequest) String ¶
func (x *ReadRequest) String() string
type RenameManyResponse ¶ added in v1.6.0
type RenameManyResponse struct { Target string // As targets can be duplicated this is the index into the slice passed to proxy.Conn. Index int Resp *emptypb.Empty Error error }
RenameManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.
type RenameRequest ¶ added in v1.6.0
type RenameRequest struct { OriginalName string `protobuf:"bytes,1,opt,name=original_name,json=originalName,proto3" json:"original_name,omitempty"` DestinationName string `protobuf:"bytes,2,opt,name=destination_name,json=destinationName,proto3" json:"destination_name,omitempty"` // contains filtered or unexported fields }
func (*RenameRequest) Descriptor
deprecated
added in
v1.6.0
func (*RenameRequest) Descriptor() ([]byte, []int)
Deprecated: Use RenameRequest.ProtoReflect.Descriptor instead.
func (*RenameRequest) GetDestinationName ¶ added in v1.6.0
func (x *RenameRequest) GetDestinationName() string
func (*RenameRequest) GetOriginalName ¶ added in v1.6.0
func (x *RenameRequest) GetOriginalName() string
func (*RenameRequest) ProtoMessage ¶ added in v1.6.0
func (*RenameRequest) ProtoMessage()
func (*RenameRequest) ProtoReflect ¶ added in v1.6.0
func (x *RenameRequest) ProtoReflect() protoreflect.Message
func (*RenameRequest) Reset ¶ added in v1.6.0
func (x *RenameRequest) Reset()
func (*RenameRequest) String ¶ added in v1.6.0
func (x *RenameRequest) String() string
type RmManyResponse ¶
type RmManyResponse struct { Target string // As targets can be duplicated this is the index into the slice passed to proxy.Conn. Index int Resp *emptypb.Empty Error error }
RmManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.
type RmRequest ¶
type RmRequest struct { // The fully qualified path to the file to remove. Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` // contains filtered or unexported fields }
func (*RmRequest) Descriptor
deprecated
func (*RmRequest) GetFilename ¶
func (*RmRequest) ProtoMessage ¶
func (*RmRequest) ProtoMessage()
func (*RmRequest) ProtoReflect ¶
func (x *RmRequest) ProtoReflect() protoreflect.Message
type RmdirManyResponse ¶
type RmdirManyResponse struct { Target string // As targets can be duplicated this is the index into the slice passed to proxy.Conn. Index int Resp *emptypb.Empty Error error }
RmdirManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.
type RmdirRequest ¶
type RmdirRequest struct { // The fully qualified path to the directory to remove. // Must be empty of any entries. Directory string `protobuf:"bytes,1,opt,name=directory,proto3" json:"directory,omitempty"` // contains filtered or unexported fields }
func (*RmdirRequest) Descriptor
deprecated
func (*RmdirRequest) Descriptor() ([]byte, []int)
Deprecated: Use RmdirRequest.ProtoReflect.Descriptor instead.
func (*RmdirRequest) GetDirectory ¶
func (x *RmdirRequest) GetDirectory() string
func (*RmdirRequest) ProtoMessage ¶
func (*RmdirRequest) ProtoMessage()
func (*RmdirRequest) ProtoReflect ¶
func (x *RmdirRequest) ProtoReflect() protoreflect.Message
func (*RmdirRequest) Reset ¶
func (x *RmdirRequest) Reset()
func (*RmdirRequest) String ¶
func (x *RmdirRequest) String() string
type SetFileAttributesManyResponse ¶
type SetFileAttributesManyResponse struct { Target string // As targets can be duplicated this is the index into the slice passed to proxy.Conn. Index int Resp *emptypb.Empty Error error }
SetFileAttributesManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.
type SetFileAttributesRequest ¶
type SetFileAttributesRequest struct { Attrs *FileAttributes `protobuf:"bytes,1,opt,name=attrs,proto3" json:"attrs,omitempty"` // contains filtered or unexported fields }
SetFileAttributesRequest processes attrs and attempts to set the path given to those attributes. As this is N steps (owner, group, permissions, etc) it is not transactional and can leave an entity in a partial state if errors occur.
func (*SetFileAttributesRequest) Descriptor
deprecated
func (*SetFileAttributesRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetFileAttributesRequest.ProtoReflect.Descriptor instead.
func (*SetFileAttributesRequest) GetAttrs ¶
func (x *SetFileAttributesRequest) GetAttrs() *FileAttributes
func (*SetFileAttributesRequest) ProtoMessage ¶
func (*SetFileAttributesRequest) ProtoMessage()
func (*SetFileAttributesRequest) ProtoReflect ¶
func (x *SetFileAttributesRequest) ProtoReflect() protoreflect.Message
func (*SetFileAttributesRequest) Reset ¶
func (x *SetFileAttributesRequest) Reset()
func (*SetFileAttributesRequest) String ¶
func (x *SetFileAttributesRequest) String() string
type StatManyResponse ¶
type StatManyResponse struct { Target string // As targets can be duplicated this is the index into the slice passed to proxy.Conn. Index int Resp *StatReply Error error }
StatManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.
type StatReply ¶
type StatReply struct { // The file path, as provided in StatRequest Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` // size of the file, in bytes Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` // NB: the file mode here is represented using Go's fs.FileMode scheme // which combines permissions with additional data such as the type // (directory, symlink, etc) Mode uint32 `protobuf:"varint,3,opt,name=mode,proto3" json:"mode,omitempty"` // File modification time Modtime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=modtime,proto3" json:"modtime,omitempty"` // UID of owner Uid uint32 `protobuf:"varint,5,opt,name=uid,proto3" json:"uid,omitempty"` // GID of owner Gid uint32 `protobuf:"varint,6,opt,name=gid,proto3" json:"gid,omitempty"` // Whether the immutable flag is set. // This only applies to systems which support immutable file bits. // For systems which support multiple types (OS/X) this refers // only to system level immutability and not user. i.e. even root // is unable to modify these files. Immutable bool `protobuf:"varint,7,opt,name=immutable,proto3" json:"immutable,omitempty"` // contains filtered or unexported fields }
StatReply contains stat information for a single file.
func (*StatReply) Descriptor
deprecated
func (*StatReply) GetFilename ¶
func (*StatReply) GetImmutable ¶
func (*StatReply) GetModtime ¶
func (x *StatReply) GetModtime() *timestamppb.Timestamp
func (*StatReply) ProtoMessage ¶
func (*StatReply) ProtoMessage()
func (*StatReply) ProtoReflect ¶
func (x *StatReply) ProtoReflect() protoreflect.Message
type StatRequest ¶
type StatRequest struct { // absolute path to the target file Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` // contains filtered or unexported fields }
StatRequest specifies the filename for which to retrieve metadata.
func (*StatRequest) Descriptor
deprecated
func (*StatRequest) Descriptor() ([]byte, []int)
Deprecated: Use StatRequest.ProtoReflect.Descriptor instead.
func (*StatRequest) GetFilename ¶
func (x *StatRequest) GetFilename() string
func (*StatRequest) ProtoMessage ¶
func (*StatRequest) ProtoMessage()
func (*StatRequest) ProtoReflect ¶
func (x *StatRequest) ProtoReflect() protoreflect.Message
func (*StatRequest) Reset ¶
func (x *StatRequest) Reset()
func (*StatRequest) String ¶
func (x *StatRequest) String() string
type SumManyResponse ¶
type SumManyResponse struct { Target string // As targets can be duplicated this is the index into the slice passed to proxy.Conn. Index int Resp *SumReply Error error }
SumManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.
type SumReply ¶
type SumReply struct { // Filename, as provided in SumRequest Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` // The type of sum used to calculate `sum` SumType SumType `protobuf:"varint,2,opt,name=sum_type,json=sumType,proto3,enum=LocalFile.SumType" json:"sum_type,omitempty"` // The sum value, as a hex-encoded string Sum string `protobuf:"bytes,3,opt,name=sum,proto3" json:"sum,omitempty"` // contains filtered or unexported fields }
SumReply contains the sum output for the given filename.
func (*SumReply) Descriptor
deprecated
func (*SumReply) GetFilename ¶
func (*SumReply) GetSumType ¶
func (*SumReply) ProtoMessage ¶
func (*SumReply) ProtoMessage()
func (*SumReply) ProtoReflect ¶
func (x *SumReply) ProtoReflect() protoreflect.Message
type SumRequest ¶
type SumRequest struct { // Absoloute path to the target file. Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` // The requested sum type. If not set, or SUM_TYPE_UNKNOWN, // an implementation-default value will be chosen automatically, // and indicated in the reply. SumType SumType `protobuf:"varint,2,opt,name=sum_type,json=sumType,proto3,enum=LocalFile.SumType" json:"sum_type,omitempty"` // contains filtered or unexported fields }
SumRequest specifies a type and filename for a sum operation.
func (*SumRequest) Descriptor
deprecated
func (*SumRequest) Descriptor() ([]byte, []int)
Deprecated: Use SumRequest.ProtoReflect.Descriptor instead.
func (*SumRequest) GetFilename ¶
func (x *SumRequest) GetFilename() string
func (*SumRequest) GetSumType ¶
func (x *SumRequest) GetSumType() SumType
func (*SumRequest) ProtoMessage ¶
func (*SumRequest) ProtoMessage()
func (*SumRequest) ProtoReflect ¶
func (x *SumRequest) ProtoReflect() protoreflect.Message
func (*SumRequest) Reset ¶
func (x *SumRequest) Reset()
func (*SumRequest) String ¶
func (x *SumRequest) String() string
type SumType ¶
type SumType int32
SumType specifies a hashing function to use when calculating file sums.
func (SumType) Descriptor ¶
func (SumType) Descriptor() protoreflect.EnumDescriptor
func (SumType) EnumDescriptor
deprecated
func (SumType) Number ¶
func (x SumType) Number() protoreflect.EnumNumber
func (SumType) Type ¶
func (SumType) Type() protoreflect.EnumType
type TailRequest ¶
type TailRequest struct { Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` // If non-zero skip N bytes into the file before returning data. // Negative implies based from end of file. Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` // contains filtered or unexported fields }
TailRequest describes the filename to be tailed.
func (*TailRequest) Descriptor
deprecated
func (*TailRequest) Descriptor() ([]byte, []int)
Deprecated: Use TailRequest.ProtoReflect.Descriptor instead.
func (*TailRequest) GetFilename ¶
func (x *TailRequest) GetFilename() string
func (*TailRequest) GetOffset ¶
func (x *TailRequest) GetOffset() int64
func (*TailRequest) ProtoMessage ¶
func (*TailRequest) ProtoMessage()
func (*TailRequest) ProtoReflect ¶
func (x *TailRequest) ProtoReflect() protoreflect.Message
func (*TailRequest) Reset ¶
func (x *TailRequest) Reset()
func (*TailRequest) String ¶
func (x *TailRequest) String() string
type UnimplementedLocalFileServer ¶
type UnimplementedLocalFileServer struct { }
UnimplementedLocalFileServer should be embedded to have forward compatible implementations.
func (UnimplementedLocalFileServer) Copy ¶
func (UnimplementedLocalFileServer) Copy(context.Context, *CopyRequest) (*emptypb.Empty, error)
func (UnimplementedLocalFileServer) List ¶
func (UnimplementedLocalFileServer) List(*ListRequest, LocalFile_ListServer) error
func (UnimplementedLocalFileServer) Read ¶
func (UnimplementedLocalFileServer) Read(*ReadActionRequest, LocalFile_ReadServer) error
func (UnimplementedLocalFileServer) Rename ¶ added in v1.6.0
func (UnimplementedLocalFileServer) Rename(context.Context, *RenameRequest) (*emptypb.Empty, error)
func (UnimplementedLocalFileServer) Rmdir ¶
func (UnimplementedLocalFileServer) Rmdir(context.Context, *RmdirRequest) (*emptypb.Empty, error)
func (UnimplementedLocalFileServer) SetFileAttributes ¶
func (UnimplementedLocalFileServer) SetFileAttributes(context.Context, *SetFileAttributesRequest) (*emptypb.Empty, error)
func (UnimplementedLocalFileServer) Stat ¶
func (UnimplementedLocalFileServer) Stat(LocalFile_StatServer) error
func (UnimplementedLocalFileServer) Sum ¶
func (UnimplementedLocalFileServer) Sum(LocalFile_SumServer) error
func (UnimplementedLocalFileServer) Write ¶
func (UnimplementedLocalFileServer) Write(LocalFile_WriteServer) error
type UnsafeLocalFileServer ¶
type UnsafeLocalFileServer interface {
// contains filtered or unexported methods
}
UnsafeLocalFileServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LocalFileServer will result in compilation errors.
type WriteManyResponse ¶
type WriteManyResponse struct { Target string // As targets can be duplicated this is the index into the slice passed to proxy.Conn. Index int Resp *emptypb.Empty Error error }
WriteManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.
type WriteRequest ¶
type WriteRequest struct { // Types that are assignable to Request: // *WriteRequest_Description // *WriteRequest_Contents Request isWriteRequest_Request `protobuf_oneof:"request"` // contains filtered or unexported fields }
WriteRequest streams the data for the filename to be written. The first request must contain a description and all future requests must contain contents. Each write request will append contents into the file until the stream is closed. Then the file is moved to it's final location.
func (*WriteRequest) Descriptor
deprecated
func (*WriteRequest) Descriptor() ([]byte, []int)
Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead.
func (*WriteRequest) GetContents ¶
func (x *WriteRequest) GetContents() []byte
func (*WriteRequest) GetDescription ¶
func (x *WriteRequest) GetDescription() *FileWrite
func (*WriteRequest) GetRequest ¶
func (m *WriteRequest) GetRequest() isWriteRequest_Request
func (*WriteRequest) ProtoMessage ¶
func (*WriteRequest) ProtoMessage()
func (*WriteRequest) ProtoReflect ¶
func (x *WriteRequest) ProtoReflect() protoreflect.Message
func (*WriteRequest) Reset ¶
func (x *WriteRequest) Reset()
func (*WriteRequest) String ¶
func (x *WriteRequest) String() string
type WriteRequest_Contents ¶
type WriteRequest_Contents struct {
Contents []byte `protobuf:"bytes,2,opt,name=contents,proto3,oneof"`
}
type WriteRequest_Description ¶
type WriteRequest_Description struct {
Description *FileWrite `protobuf:"bytes,1,opt,name=description,proto3,oneof"`
}