Documentation
¶
Index ¶
- Constants
- func FSEntry(fsys fs.FS, filerEntry *filer.Entry, options ...func(*fs.Entry)) (*fs.Entry, error)
- func WithCluster(c *cluster.Cluster) func(*Lettuce)
- func WithContext(ctx context.Context) func(*File)
- func WithEntry(e *filer.Entry) func(*File)
- func WithGID(gid uint32) func(*Lettuce)
- func WithHTTPClient(c *gohttp.Client) func(*File)
- func WithUID(uid uint32) func(*Lettuce)
- type File
- func (f *File) Close() error
- func (f *File) Read(b []byte) (int, error)
- func (f *File) ReadAt(b []byte, off int64) (int, error)
- func (f *File) ReadDir(n int) ([]gofs.DirEntry, error)
- func (f *File) ReadFrom(r io.Reader) (int64, error)
- func (f *File) Readdir(count int) ([]gofs.FileInfo, error)
- func (f *File) Seek(off int64, whence int) (int64, error)
- func (f *File) Stat() (gofs.FileInfo, error)
- func (f *File) String() string
- func (f *File) Sync() error
- func (f *File) Write(b []byte) (int, error)
- type Lettuce
- func (l *Lettuce) Close() error
- func (l *Lettuce) Cluster() *cluster.Cluster
- func (l *Lettuce) Create(name string) (fs.File, error)
- func (l *Lettuce) Glob(pattern string) ([]string, error)
- func (l *Lettuce) Mkdir(name string, perm gofs.FileMode) error
- func (l *Lettuce) MkdirAll(path string, mode gofs.FileMode) error
- func (l *Lettuce) Open(name string) (gofs.File, error)
- func (l *Lettuce) OpenFile(name string, flag int, mode gofs.FileMode) (fs.File, error)
- func (l *Lettuce) PathSeparator() string
- func (l *Lettuce) Provider() string
- func (l *Lettuce) ReadDir(name string) ([]gofs.DirEntry, error)
- func (l *Lettuce) ReadFile(name string) ([]byte, error)
- func (l *Lettuce) Remove(name string) error
- func (l *Lettuce) RemoveAll(path string) error
- func (l *Lettuce) Rename(oldpath string, newpath string) error
- func (l *Lettuce) Root() (string, error)
- func (l *Lettuce) Stat(name string) (gofs.FileInfo, error)
- func (l *Lettuce) String() string
- func (l *Lettuce) Sub(dir string) (gofs.FS, error)
- func (l *Lettuce) WriteFile(name string, data []byte, mode gofs.FileMode) error
- type WebDAV
- func (w *WebDAV) Close() error
- func (w *WebDAV) Mkdir(ctx context.Context, name string, mode os.FileMode) error
- func (w *WebDAV) OpenFile(ctx context.Context, name string, flag int, mode os.FileMode) (webdav.File, error)
- func (w *WebDAV) RemoveAll(ctx context.Context, name string) error
- func (w *WebDAV) Rename(ctx context.Context, oldName string, newName string) error
- func (w *WebDAV) Stat(ctx context.Context, name string) (os.FileInfo, error)
Constants ¶
View Source
const ( // GRPCKeepAlive configuration path. // // String: <root>.lettuce.client.grpc.keepAlive GRPCKeepAlive = clientGRPC + ".keepAlive" // GRPCKeepAliveTime configuration path. // // String: <root>.lettuce.client.grpc.keepAlive.time GRPCKeepAliveTime = GRPCKeepAlive + ".time" // GRPCKeepAliveTimeout configuration path. // // String: <root>.lettuce.client.grpc.keepAlive.timeout GRPCKeepAliveTimeout = GRPCKeepAlive + ".timeout" // GRPCKeepAlivePermitWithoutStream configuration path. // // String: <root>.lettuce.client.grpc.keepAlive.permitWithoutStream GRPCKeepAlivePermitWithoutStream = GRPCKeepAlive + ".permitWithoutStream" // GRPCMessageSizeMax configuration path. // // String: <root>.lettuce.client.grpc.messageSizeMax GRPCMessageSizeMax = clientGRPC + ".messageSizeMax" // GRPCMessageSizeMaxReceive configuration path. // // String: <root>.lettuce.client.grpc.messageSizeMax.receive GRPCMessageSizeMaxReceive = GRPCMessageSizeMax + ".receive" // GRPCMessageSizeMaxSend configuration path. // // String: <root>.lettuce.client.grpc.messageSizeMax.send GRPCMessageSizeMaxSend = GRPCMessageSizeMax + ".send" // GRPCSecurity configuration path. // // String: <root>.lettuce.client.grpc.security GRPCSecurity = clientGRPC + ".security" // GRPCSecurityTLS configuration path. // // String: <root>.lettuce.client.grpc.security.tls GRPCSecurityTLS = GRPCSecurity + ".tls" // GRPCSecurityTLSEnable configuration path. // // String: <root>.lettuce.client.grpc.security.tls.enable GRPCSecurityTLSEnable = GRPCSecurityTLS + ".enable" // GRPCSecurityTLSCertFile configuration path. // // String: <root>.lettuce.client.grpc.security.tls.certFile GRPCSecurityTLSCertFile = GRPCSecurityTLS + ".certFile" // GRPCSecurityTLSKeyFile configuration path. // // String: <root>.lettuce.client.grpc.security.tls.keyFile GRPCSecurityTLSKeyFile = GRPCSecurityTLS + ".keyFile" // SOCKS5Enable configuration path. // // value: <root>.lettuce.client.socks5.enable SOCKS5Enable = ".lettuce.client.socks5.enable" // SeaweedFSCluster configuration Path. // // String: <root>.lettuce.seaweedfs.cluster SeaweedFSCluster = seaweedFS + ".cluster" // SeaweedFSClusterLocal configuration Path. // // String: <root>.lettuce.seaweedfs.cluster.local SeaweedFSClusterLocal = SeaweedFSCluster + ".local" // SeaweedFSClusterFiler configuration Path. // // String: <root>.lettuce.seaweedfs.cluster.filer SeaweedFSClusterFiler = SeaweedFSCluster + ".filer" // SeaweedFSClusterFilerAddr configuration Path. // // String: <root>.lettuce.seaweedfs.cluster.filer.address SeaweedFSClusterFilerAddr = SeaweedFSClusterFiler + ".address" // SeaweedFSClusterMaster configuration Path. // // String: <root>.lettuce.seaweedfs.cluster.master SeaweedFSClusterMaster = SeaweedFSCluster + ".master" // SeaweedFSClusterMasterAddr configuration Path. // // String: <root>.lettuce.seaweedfs.cluster.master.address SeaweedFSClusterMasterAddr = SeaweedFSClusterMaster + ".address" )
Variables ¶
This section is empty.
Functions ¶
func WithCluster ¶
WithCluster sets the cluster for communicating with SeaweedFS backend services.
func WithContext ¶
WithContext sets the context.Context used by the File.
func WithHTTPClient ¶
WithHTTPClient sets the http.Client used for read/write operations for a File.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File provides access to a single file or directory.
Implements the behavior defined by the fs.File and http.File interfaces.
type Lettuce ¶
type Lettuce struct {
// contains filtered or unexported fields
}
Lettuce is a file system provider that implements fs.FS using SeaweedFS for the storage backend.
func (*Lettuce) Cluster ¶
Cluster returns the cluster API used for performing operations against a SeaweedFS backend.
type WebDAV ¶
type WebDAV struct {
// contains filtered or unexported fields
}
WebDAV an implementation of the webdav.FileSystem using SeaweedFS for the storage backend.
Click to show internal directories.
Click to hide internal directories.