file

package
v0.0.0-...-71fdcac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2023 License: BSD-3-Clause Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FileErr_name = map[int32]string{
		0:  "NoError",
		1:  "DispatchError",
		2:  "UnmarshalError",
		3:  "MarshalError",
		4:  "InvalidPathError",
		5:  "AlreadyInUseError",
		6:  "NotExistError",
		7:  "FileClosedError",
		8:  "EOFError",
		9:  "ReadError",
		10: "WriteError",
		11: "OpenError",
		12: "DeleteError",
		13: "CreateError",
		14: "NoDataFoundError",
		15: "LargeBufError",
		16: "InternalError",
	}
	FileErr_value = map[string]int32{
		"NoError":           0,
		"DispatchError":     1,
		"UnmarshalError":    2,
		"MarshalError":      3,
		"InvalidPathError":  4,
		"AlreadyInUseError": 5,
		"NotExistError":     6,
		"FileClosedError":   7,
		"EOFError":          8,
		"ReadError":         9,
		"WriteError":        10,
		"OpenError":         11,
		"DeleteError":       12,
		"CreateError":       13,
		"NoDataFoundError":  14,
		"LargeBufError":     15,
		"InternalError":     16,
	}
)

Enum value maps for FileErr.

View Source
var File_file_v1_file_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CloseRequest

type CloseRequest struct {
	Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*CloseRequest) Descriptor deprecated

func (*CloseRequest) Descriptor() ([]byte, []int)

Deprecated: Use CloseRequest.ProtoReflect.Descriptor instead.

func (*CloseRequest) GetId

func (x *CloseRequest) GetId() *v1.IdRaw

func (*CloseRequest) ProtoMessage

func (*CloseRequest) ProtoMessage()

func (*CloseRequest) ProtoReflect

func (x *CloseRequest) ProtoReflect() protoreflect.Message

func (*CloseRequest) Reset

func (x *CloseRequest) Reset()

func (*CloseRequest) String

func (x *CloseRequest) String() string

type CloseResponse

type CloseResponse struct {
	Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

CloseResponse is not empty because it can return an error. However, there is no action that the receiver of this response can take other than perhaps issuing a warning to the system operators.

func (*CloseResponse) Descriptor deprecated

func (*CloseResponse) Descriptor() ([]byte, []int)

Deprecated: Use CloseResponse.ProtoReflect.Descriptor instead.

func (*CloseResponse) GetId

func (x *CloseResponse) GetId() *v1.IdRaw

func (*CloseResponse) ProtoMessage

func (*CloseResponse) ProtoMessage()

func (*CloseResponse) ProtoReflect

func (x *CloseResponse) ProtoReflect() protoreflect.Message

func (*CloseResponse) Reset

func (x *CloseResponse) Reset()

func (*CloseResponse) String

func (x *CloseResponse) String() string

type CreateRequest

type CreateRequest struct {
	Path    string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRequest) Descriptor deprecated

func (*CreateRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetContent

func (x *CreateRequest) GetContent() string

func (*CreateRequest) GetPath

func (x *CreateRequest) GetPath() string

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) ProtoReflect

func (x *CreateRequest) ProtoReflect() protoreflect.Message

func (*CreateRequest) Reset

func (x *CreateRequest) Reset()

func (*CreateRequest) String

func (x *CreateRequest) String() string

type CreateResponse

type CreateResponse struct {
	Path      string    `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Id        *v1.IdRaw `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Truncated bool      `protobuf:"varint,3,opt,name=truncated,proto3" json:"truncated,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateResponse) Descriptor deprecated

func (*CreateResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.

func (*CreateResponse) GetId

func (x *CreateResponse) GetId() *v1.IdRaw

func (*CreateResponse) GetPath

func (x *CreateResponse) GetPath() string

func (*CreateResponse) GetTruncated

func (x *CreateResponse) GetTruncated() bool

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) ProtoReflect

func (x *CreateResponse) ProtoReflect() protoreflect.Message

func (*CreateResponse) Reset

func (x *CreateResponse) Reset()

func (*CreateResponse) String

func (x *CreateResponse) String() string

type DefFile

type DefFile struct{}

func (DefFile) Letter

func (f DefFile) Letter() byte

func (DefFile) ShortString

func (f DefFile) ShortString() string

type DeleteRequest

type DeleteRequest struct {
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRequest) Descriptor deprecated

func (*DeleteRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetPath

func (x *DeleteRequest) GetPath() string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

func (x *DeleteRequest) ProtoReflect() protoreflect.Message

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteResponse

type DeleteResponse struct {
	Path string    `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Id   *v1.IdRaw `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteResponse) Descriptor deprecated

func (*DeleteResponse) Descriptor() ([]byte, []int)

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) GetId

func (x *DeleteResponse) GetId() *v1.IdRaw

func (*DeleteResponse) GetPath

func (x *DeleteResponse) GetPath() string

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

func (x *DeleteResponse) ProtoReflect() protoreflect.Message

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type FileErr

type FileErr int32
const (
	FileErr_NoError        FileErr = 0 // mandatory
	FileErr_DispatchError  FileErr = 1 //mandatory
	FileErr_UnmarshalError FileErr = 2 // mandatory
	FileErr_MarshalError   FileErr = 3 // mandatory
	// InvalidPathError: Provided path name is not valid based on following rules:
	//  1. The separator should be "/"
	//  2. It should start with specific prefix -> '/parigot/app/'
	//  3. It should not contain any "." or ".." in the path
	//  4. It should not exceed a specific value for the number (max is 20) of parts in the path
	//  5. It should avoid certain special characters, including:
	//     Asterisk (*)					Question mark (?)		Greater than (>)
	//     Less than (<)				Pipe symbol (|)			Ampersand (&)
	//     Semicolon (;)				Dollar sign ($)			Backtick (`)
	//     Double quotation marks (")	Single quotation mark (')
	//
	// Invalid example:
	//
	//	'/parigot/app/..' -> '..' is not allowed
	//	'/parigot/app/./' -> '.' is not allowed
	//	'/parigot/app/foo\bar' -> '\' is not allowed
	//	'//parigot/app/foo', '/parigot/app' -> prefix should be '/parigot/app/'
	FileErr_InvalidPathError FileErr = 4
	// File status related errors
	FileErr_AlreadyInUseError FileErr = 5  // The file is already being used.
	FileErr_NotExistError     FileErr = 6  // The file/path does not exist
	FileErr_FileClosedError   FileErr = 7  // The file status is CLOSED, cannot be accessed by a read or write request
	FileErr_EOFError          FileErr = 8  // The file is at the end of the file
	FileErr_ReadError         FileErr = 9  // Some error happened during reading a file
	FileErr_WriteError        FileErr = 10 // Some error happened during writing a file
	FileErr_OpenError         FileErr = 11 // Some error happened during opening a file
	FileErr_DeleteError       FileErr = 12 // Some error happened during deleting a file
	FileErr_CreateError       FileErr = 13 // Some error happened during creating a file
	FileErr_NoDataFoundError  FileErr = 14 // No data file found in the directory
	FileErr_LargeBufError     FileErr = 15 // The buffer for the file is too large
	FileErr_InternalError     FileErr = 16 // There are internal issues with the file service
)

func (FileErr) Descriptor

func (FileErr) Descriptor() protoreflect.EnumDescriptor

func (FileErr) Enum

func (x FileErr) Enum() *FileErr

func (FileErr) EnumDescriptor deprecated

func (FileErr) EnumDescriptor() ([]byte, []int)

Deprecated: Use FileErr.Descriptor instead.

func (FileErr) Number

func (x FileErr) Number() protoreflect.EnumNumber

func (FileErr) String

func (x FileErr) String() string

func (FileErr) Type

func (FileErr) Type() protoreflect.EnumType

type FileId

type FileId id.IdRoot[DefFile]

func FileIdEmptyValue

func FileIdEmptyValue() FileId

func FileIdFromPair

func FileIdFromPair(high, low uint64) FileId

FromPair is probably not something you want to use unless you are pulling values from external storage or files. If you pulling values from the network, use the Marshal() ad Unmarshal() functions to work with Ids. Absolutely no checking is done on the values provided, so much caution is advised.

func FileIdZeroValue

func FileIdZeroValue() FileId

func NewFileId

func NewFileId() FileId

func UnmarshalFileId

func UnmarshalFileId(b *protosupport.IdRaw) FileId

func (FileId) Equal

func (f FileId) Equal(other FileId) bool

func (FileId) High

func (f FileId) High() uint64

func (FileId) IsEmptyValue

func (f FileId) IsEmptyValue() bool

func (FileId) IsZeroOrEmptyValue

func (f FileId) IsZeroOrEmptyValue() bool

func (FileId) IsZeroValue

func (f FileId) IsZeroValue() bool

func (FileId) Low

func (f FileId) Low() uint64

func (FileId) Marshal

func (f FileId) Marshal() *protosupport.IdRaw

func (FileId) Short

func (f FileId) Short() string

func (FileId) String

func (f FileId) String() string

type FileInfo

type FileInfo struct {
	Path       string                 `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	IsDir      bool                   `protobuf:"varint,3,opt,name=is_dir,json=isDir,proto3" json:"is_dir,omitempty"`
	Size       int32                  `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // creation time
	ModTime    *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=mod_time,json=modTime,proto3" json:"mod_time,omitempty"`          // modification time
	// contains filtered or unexported fields
}

Define the FileInfo struct

func (*FileInfo) Descriptor deprecated

func (*FileInfo) Descriptor() ([]byte, []int)

Deprecated: Use FileInfo.ProtoReflect.Descriptor instead.

func (*FileInfo) GetCreateTime

func (x *FileInfo) GetCreateTime() *timestamppb.Timestamp

func (*FileInfo) GetIsDir

func (x *FileInfo) GetIsDir() bool

func (*FileInfo) GetModTime

func (x *FileInfo) GetModTime() *timestamppb.Timestamp

func (*FileInfo) GetPath

func (x *FileInfo) GetPath() string

func (*FileInfo) GetSize

func (x *FileInfo) GetSize() int32

func (*FileInfo) ProtoMessage

func (*FileInfo) ProtoMessage()

func (*FileInfo) ProtoReflect

func (x *FileInfo) ProtoReflect() protoreflect.Message

func (*FileInfo) Reset

func (x *FileInfo) Reset()

func (*FileInfo) String

func (x *FileInfo) String() string

type LoadTestDataRequest

type LoadTestDataRequest struct {

	// path is a path to a directory on the _host_ filesystem that is to be loaded in /app
	DirPath string `protobuf:"bytes,1,opt,name=dir_path,json=dirPath,proto3" json:"dir_path,omitempty"`
	// where this new file will exist in the in-memory filesystem... this path
	// will be cleaned lexically and then joined to /app.  Note that it is possible
	// create paths with this parameter that cannot be opened because of
	// restrictions on the path in open.
	MountLocation string `protobuf:"bytes,2,opt,name=mount_location,json=mountLocation,proto3" json:"mount_location,omitempty"`
	// returnOnFail should be set to true if you do NOT want the normal behavior of using panic on error.
	// If this value is set to true, the paths that cause an error on import are return in the TestDataResponse.
	ReturnOnFail bool `protobuf:"varint,3,opt,name=return_on_fail,json=returnOnFail,proto3" json:"return_on_fail,omitempty"`
	// contains filtered or unexported fields
}

LoadTestDataRequest loads the contents of given directory from the _host_ file system into the /app directory of the test filesystem (in memory). This is only intended to be use for test code.

func (*LoadTestDataRequest) Descriptor deprecated

func (*LoadTestDataRequest) Descriptor() ([]byte, []int)

Deprecated: Use LoadTestDataRequest.ProtoReflect.Descriptor instead.

func (*LoadTestDataRequest) GetDirPath

func (x *LoadTestDataRequest) GetDirPath() string

func (*LoadTestDataRequest) GetMountLocation

func (x *LoadTestDataRequest) GetMountLocation() string

func (*LoadTestDataRequest) GetReturnOnFail

func (x *LoadTestDataRequest) GetReturnOnFail() bool

func (*LoadTestDataRequest) ProtoMessage

func (*LoadTestDataRequest) ProtoMessage()

func (*LoadTestDataRequest) ProtoReflect

func (x *LoadTestDataRequest) ProtoReflect() protoreflect.Message

func (*LoadTestDataRequest) Reset

func (x *LoadTestDataRequest) Reset()

func (*LoadTestDataRequest) String

func (x *LoadTestDataRequest) String() string

type LoadTestDataResponse

type LoadTestDataResponse struct {
	ErrorPath []string `protobuf:"bytes,1,rep,name=error_path,json=errorPath,proto3" json:"error_path,omitempty"`
	// contains filtered or unexported fields
}

LoadTestDataResponse contains a list of paths that caused an error during loading. This value is only returned if the LoadRequest has the returnOnFail set to true. If LoadDataRequest.return_on_fail is false since by definition the error_path will be empty.

func (*LoadTestDataResponse) Descriptor deprecated

func (*LoadTestDataResponse) Descriptor() ([]byte, []int)

Deprecated: Use LoadTestDataResponse.ProtoReflect.Descriptor instead.

func (*LoadTestDataResponse) GetErrorPath

func (x *LoadTestDataResponse) GetErrorPath() []string

func (*LoadTestDataResponse) ProtoMessage

func (*LoadTestDataResponse) ProtoMessage()

func (*LoadTestDataResponse) ProtoReflect

func (x *LoadTestDataResponse) ProtoReflect() protoreflect.Message

func (*LoadTestDataResponse) Reset

func (x *LoadTestDataResponse) Reset()

func (*LoadTestDataResponse) String

func (x *LoadTestDataResponse) String() string

type OpenRequest

type OpenRequest struct {
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

func (*OpenRequest) Descriptor deprecated

func (*OpenRequest) Descriptor() ([]byte, []int)

Deprecated: Use OpenRequest.ProtoReflect.Descriptor instead.

func (*OpenRequest) GetPath

func (x *OpenRequest) GetPath() string

func (*OpenRequest) ProtoMessage

func (*OpenRequest) ProtoMessage()

func (*OpenRequest) ProtoReflect

func (x *OpenRequest) ProtoReflect() protoreflect.Message

func (*OpenRequest) Reset

func (x *OpenRequest) Reset()

func (*OpenRequest) String

func (x *OpenRequest) String() string

type OpenResponse

type OpenResponse struct {
	Path string    `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Id   *v1.IdRaw `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*OpenResponse) Descriptor deprecated

func (*OpenResponse) Descriptor() ([]byte, []int)

Deprecated: Use OpenResponse.ProtoReflect.Descriptor instead.

func (*OpenResponse) GetId

func (x *OpenResponse) GetId() *v1.IdRaw

func (*OpenResponse) GetPath

func (x *OpenResponse) GetPath() string

func (*OpenResponse) ProtoMessage

func (*OpenResponse) ProtoMessage()

func (*OpenResponse) ProtoReflect

func (x *OpenResponse) ProtoReflect() protoreflect.Message

func (*OpenResponse) Reset

func (x *OpenResponse) Reset()

func (*OpenResponse) String

func (x *OpenResponse) String() string

type ReadRequest

type ReadRequest struct {
	Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Reads up to len(buf) bytes into buf
	Buf []byte `protobuf:"bytes,2,opt,name=buf,proto3" json:"buf,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadRequest) Descriptor deprecated

func (*ReadRequest) Descriptor() ([]byte, []int)

Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.

func (*ReadRequest) GetBuf

func (x *ReadRequest) GetBuf() []byte

func (*ReadRequest) GetId

func (x *ReadRequest) GetId() *v1.IdRaw

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 ReadResponse

type ReadResponse struct {
	Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The number of bytes read (0 <= num_read <= len(buf))
	NumRead int32 `protobuf:"varint,2,opt,name=num_read,json=numRead,proto3" json:"num_read,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadResponse) Descriptor deprecated

func (*ReadResponse) Descriptor() ([]byte, []int)

Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.

func (*ReadResponse) GetId

func (x *ReadResponse) GetId() *v1.IdRaw

func (*ReadResponse) GetNumRead

func (x *ReadResponse) GetNumRead() int32

func (*ReadResponse) ProtoMessage

func (*ReadResponse) ProtoMessage()

func (*ReadResponse) ProtoReflect

func (x *ReadResponse) ProtoReflect() protoreflect.Message

func (*ReadResponse) Reset

func (x *ReadResponse) Reset()

func (*ReadResponse) String

func (x *ReadResponse) String() string

type StatRequest

type StatRequest struct {
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

StatRequest asks for the information about a file

func (*StatRequest) Descriptor deprecated

func (*StatRequest) Descriptor() ([]byte, []int)

Deprecated: Use StatRequest.ProtoReflect.Descriptor instead.

func (*StatRequest) GetPath

func (x *StatRequest) GetPath() 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 StatResponse

type StatResponse struct {
	FileInfo *FileInfo `protobuf:"bytes,1,opt,name=file_info,json=fileInfo,proto3" json:"file_info,omitempty"`
	// contains filtered or unexported fields
}

Use the FileInfo struct in the StatResponse message

func (*StatResponse) Descriptor deprecated

func (*StatResponse) Descriptor() ([]byte, []int)

Deprecated: Use StatResponse.ProtoReflect.Descriptor instead.

func (*StatResponse) GetFileInfo

func (x *StatResponse) GetFileInfo() *FileInfo

func (*StatResponse) ProtoMessage

func (*StatResponse) ProtoMessage()

func (*StatResponse) ProtoReflect

func (x *StatResponse) ProtoReflect() protoreflect.Message

func (*StatResponse) Reset

func (x *StatResponse) Reset()

func (*StatResponse) String

func (x *StatResponse) String() string

type WriteRequest

type WriteRequest struct {
	Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Writes len(buf) bytes from buf
	Buf []byte `protobuf:"bytes,2,opt,name=buf,proto3" json:"buf,omitempty"`
	// contains filtered or unexported fields
}

func (*WriteRequest) Descriptor deprecated

func (*WriteRequest) Descriptor() ([]byte, []int)

Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead.

func (*WriteRequest) GetBuf

func (x *WriteRequest) GetBuf() []byte

func (*WriteRequest) GetId

func (x *WriteRequest) GetId() *v1.IdRaw

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 WriteResponse

type WriteResponse struct {
	Id *v1.IdRaw `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The number of bytes written from buf (0 <= num_write <= len(buf))
	NumWrite int32 `protobuf:"varint,2,opt,name=num_write,json=numWrite,proto3" json:"num_write,omitempty"`
	// contains filtered or unexported fields
}

func (*WriteResponse) Descriptor deprecated

func (*WriteResponse) Descriptor() ([]byte, []int)

Deprecated: Use WriteResponse.ProtoReflect.Descriptor instead.

func (*WriteResponse) GetId

func (x *WriteResponse) GetId() *v1.IdRaw

func (*WriteResponse) GetNumWrite

func (x *WriteResponse) GetNumWrite() int32

func (*WriteResponse) ProtoMessage

func (*WriteResponse) ProtoMessage()

func (*WriteResponse) ProtoReflect

func (x *WriteResponse) ProtoReflect() protoreflect.Message

func (*WriteResponse) Reset

func (x *WriteResponse) Reset()

func (*WriteResponse) String

func (x *WriteResponse) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL