Versions in this module Expand all Collapse all v0 v0.0.3 Aug 10, 2024 Changes in this version + const CheckRead + const FHSize + const FSInfoPropertyCanSetTime + const FSInfoPropertyHomogeneous + const FSInfoPropertyLink + const FSInfoPropertySymlink + const FTYPE_NF3BLK + const FTYPE_NF3CHR + const FTYPE_NF3DIR + const FTYPE_NF3FIFO + const FTYPE_NF3LNK + const FTYPE_NF3REG + const FTYPE_NF3SOCK + const MNTNameLen + const MaxRead + const MntPathLen + const PathNameMax + var ErrAlreadySent = errors.New("response already started") + var ErrInputInvalid = errors.New("invalid input") + func RegisterMessageHandler(protocol uint32, proc uint32, handler HandleFunc) error + func Serve(l net.Listener, handler Handler) error + func SetLogger(logger Logger) + func WritePostOpAttrs(writer io.Writer, post *FileAttribute) error + func WriteWcc(writer io.Writer, pre *FileCacheAttribute, post *FileAttribute) error + type AuthError struct + func (a *AuthError) Code() ResponseCode + func (a *AuthError) Error() string + func (a *AuthError) MarshalBinary() (data []byte, err error) + type AuthFlavor uint32 + const AuthFlavorDES + const AuthFlavorNull + const AuthFlavorShort + const AuthFlavorUnix + type AuthStat uint32 + const AuthStatBadCred + const AuthStatBadVerifier + const AuthStatDecode + const AuthStatFailed + const AuthStatInvalidResponse + const AuthStatKerbGeneric + const AuthStatNetAddr + const AuthStatOK + const AuthStatRPCGSSCTXProblem + const AuthStatRPCGSSCredProblem + const AuthStatRejectedCred + const AuthStatRejectedVerfier + const AuthStatTimeExpire + const AuthStatTktFile + const AuthStatTooWeak + type CachingHandler interface + DataForVerifier func(path string, verifier uint64) []fs.FileInfo + VerifierFor func(path string, contents []fs.FileInfo) uint64 + type DefaultLogger struct + Level LogLevel + func (l *DefaultLogger) Debug(args ...interface{}) + func (l *DefaultLogger) Debugf(format string, args ...interface{}) + func (l *DefaultLogger) Error(args ...interface{}) + func (l *DefaultLogger) Errorf(format string, args ...interface{}) + func (l *DefaultLogger) Fatal(args ...interface{}) + func (l *DefaultLogger) Fatalf(format string, args ...interface{}) + func (l *DefaultLogger) GetLevel() LogLevel + func (l *DefaultLogger) Info(args ...interface{}) + func (l *DefaultLogger) Infof(format string, args ...interface{}) + func (l *DefaultLogger) Panic(args ...interface{}) + func (l *DefaultLogger) Panicf(format string, args ...interface{}) + func (l *DefaultLogger) ParseLevel(level string) (LogLevel, error) + func (l *DefaultLogger) Print(args ...interface{}) + func (l *DefaultLogger) Printf(format string, args ...interface{}) + func (l *DefaultLogger) SetLevel(level LogLevel) + func (l *DefaultLogger) Trace(args ...interface{}) + func (l *DefaultLogger) Tracef(format string, args ...interface{}) + func (l *DefaultLogger) Warn(args ...interface{}) + func (l *DefaultLogger) Warnf(format string, args ...interface{}) + type DirOpArg struct + Filename []byte + Handle []byte + type FSStat struct + AvailableFiles uint64 + AvailableSize uint64 + CacheHint time.Duration + FreeFiles uint64 + FreeSize uint64 + TotalFiles uint64 + TotalSize uint64 + type FileAttribute struct + Atime FileTime + Ctime FileTime + FSID uint64 + FileMode uint32 + Fileid uint64 + Filesize uint64 + GID uint32 + Mtime FileTime + Nlink uint32 + SpecData [2]uint32 + Type FileType + UID uint32 + Used uint64 + func ToFileAttribute(info os.FileInfo, filePath string) *FileAttribute + func (f *FileAttribute) Mode() os.FileMode + func (f FileAttribute) AsCache() *FileCacheAttribute + type FileCacheAttribute struct + Ctime FileTime + Filesize uint64 + Mtime FileTime + type FileHandle []byte + type FileTime struct + Nseconds uint32 + Seconds uint32 + func ToNFSTime(t time.Time) FileTime + func (t FileTime) EqualTimespec(sec int64, nsec int64) bool + func (t FileTime) Native() *time.Time + type FileType uint32 + const FileTypeBlock + const FileTypeCharacter + const FileTypeDirectory + const FileTypeFIFO + const FileTypeLink + const FileTypeRegular + const FileTypeSocket + func (f FileType) String() string + type HandleFunc func(ctx context.Context, w *response, userHandler Handler) error + type Handler interface + Change func(billy.Filesystem) billy.Change + FSStat func(context.Context, billy.Filesystem, *FSStat) error + FromHandle func(fh []byte) (billy.Filesystem, []string, error) + HandleLimit func() int + InvalidateHandle func(billy.Filesystem, []byte) error + Mount func(context.Context, net.Conn, MountRequest) (MountStatus, billy.Filesystem, []AuthFlavor) + ToHandle func(fs billy.Filesystem, path []string) []byte + type LogLevel int + const DebugLevel + const ErrorLevel + const FatalLevel + const InfoLevel + const PanicLevel + const TraceLevel + const WarnLevel + type Logger interface + Debug func(args ...interface{}) + Debugf func(format string, args ...interface{}) + Error func(args ...interface{}) + Errorf func(format string, args ...interface{}) + Fatal func(args ...interface{}) + Fatalf func(format string, args ...interface{}) + GetLevel func() LogLevel + Info func(args ...interface{}) + Infof func(format string, args ...interface{}) + Panic func(args ...interface{}) + Panicf func(format string, args ...interface{}) + ParseLevel func(level string) (LogLevel, error) + Print func(args ...interface{}) + Printf func(format string, args ...interface{}) + SetLevel func(level LogLevel) + Trace func(args ...interface{}) + Tracef func(format string, args ...interface{}) + Warn func(args ...interface{}) + Warnf func(format string, args ...interface{}) + var Log Logger = &DefaultLogger{} + type MountProcedure uint32 + const MountProcDump + const MountProcExport + const MountProcMount + const MountProcNull + const MountProcUmnt + const MountProcUmntAll + func (m MountProcedure) String() string + type MountRequest struct + Dirpath []byte + type MountResponse struct + AuthFlavors []int + type MountStatus uint32 + const MountStatusErrAcces + const MountStatusErrIO + const MountStatusErrInval + const MountStatusErrNameTooLong + const MountStatusErrNoEnt + const MountStatusErrNotDir + const MountStatusErrNotSupp + const MountStatusErrPerm + const MountStatusErrServerFault + const MountStatusOk + type NFSProcedure uint32 + const NFSProcedureAccess + const NFSProcedureCommit + const NFSProcedureCreate + const NFSProcedureFSInfo + const NFSProcedureFSStat + const NFSProcedureGetAttr + const NFSProcedureLink + const NFSProcedureLookup + const NFSProcedureMkDir + const NFSProcedureMkNod + const NFSProcedureNull + const NFSProcedurePathConf + const NFSProcedureRead + const NFSProcedureReadDir + const NFSProcedureReadDirPlus + const NFSProcedureReadlink + const NFSProcedureRemove + const NFSProcedureRename + const NFSProcedureRmDir + const NFSProcedureSetAttr + const NFSProcedureSymlink + const NFSProcedureWrite + func (n NFSProcedure) String() string + type NFSStatus uint32 + const NFSStatusAccess + const NFSStatusBadCookie + const NFSStatusBadHandle + const NFSStatusBadType + const NFSStatusDQuot + const NFSStatusExist + const NFSStatusFBig + const NFSStatusIO + const NFSStatusInval + const NFSStatusIsDir + const NFSStatusJukebox + const NFSStatusMlink + const NFSStatusNXIO + const NFSStatusNameTooLong + const NFSStatusNoDev + const NFSStatusNoEnt + const NFSStatusNoSPC + const NFSStatusNotDir + const NFSStatusNotEmpty + const NFSStatusNotSupp + const NFSStatusNotSync + const NFSStatusOk + const NFSStatusPerm + const NFSStatusROFS + const NFSStatusRemote + const NFSStatusServerFault + const NFSStatusStale + const NFSStatusTooSmall + const NFSStatusXDev + func (s NFSStatus) String() string + type NFSStatusError struct + WrappedErr error + func (s *NFSStatusError) Code() ResponseCode + func (s *NFSStatusError) Error() string + func (s *NFSStatusError) MarshalBinary() (data []byte, err error) + func (s *NFSStatusError) Unwrap() error + type RPCError interface + Code func() ResponseCode + Error func() string + type RPCMismatchError struct + High uint32 + Low uint32 + func (r *RPCMismatchError) Code() ResponseCode + func (r *RPCMismatchError) Error() string + func (r *RPCMismatchError) MarshalBinary() (data []byte, err error) + type ResponseCode uint32 + const ResponseCodeAuthError + const ResponseCodeGarbageArgs + const ResponseCodeProcUnavailable + const ResponseCodeProgUnavailable + const ResponseCodeRPCMismatch + const ResponseCodeSuccess + const ResponseCodeSystemErr + type ResponseCodeProcUnavailableError struct + func (r *ResponseCodeProcUnavailableError) Code() ResponseCode + func (r *ResponseCodeProcUnavailableError) Error() string + func (r *ResponseCodeProcUnavailableError) MarshalBinary() (data []byte, err error) + type ResponseCodeSystemError struct + func (r *ResponseCodeSystemError) Code() ResponseCode + func (r *ResponseCodeSystemError) Error() string + func (r *ResponseCodeSystemError) MarshalBinary() (data []byte, err error) + type Server struct + ID [8]byte + func (s *Server) Serve(l net.Listener) error + type SetFileAttributes struct + SetAtime *time.Time + SetGID *uint32 + SetMode *uint32 + SetMtime *time.Time + SetSize *uint64 + SetUID *uint32 + func ReadSetFileAttributes(r io.Reader) (*SetFileAttributes, error) + func (s *SetFileAttributes) Apply(changer billy.Change, fs billy.Filesystem, file string) error + func (s *SetFileAttributes) Mode(def os.FileMode) os.FileMode + type StatusErrorWithBody struct + Body []byte + func (s *StatusErrorWithBody) MarshalBinary() (data []byte, err error) + type UnixChange interface + Link func(path string, link string) error + Mkfifo func(path string, mode uint32) error + Mknod func(path string, mode uint32, major uint32, minor uint32) error + Socket func(path string) error