Documentation
¶
Index ¶
- type FileBackend
- func (FileBackend) Close() error
- func (self *FileBackend) CreateObject(ctx context.Context, req schema.CreateObjectRequest) (*schema.Object, error)
- func (self FileBackend) DeleteObjects(ctx context.Context, req schema.DeleteObjectsRequest) error
- func (self *FileBackend) GetObject(ctx context.Context, req schema.GetObjectRequest) (*schema.Object, error)
- func (self FileBackend) ListObjects(ctx context.Context, iterator *schema.ObjectListIterator) (err error)
- func (self *FileBackend) Name() string
- func (self *FileBackend) ReadObject(ctx context.Context, req schema.GetObjectRequest) (io.ReadCloser, *schema.Object, error)
- func (self *FileBackend) URL() *url.URL
- type WritableFS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileBackend ¶
type FileBackend struct {
// contains filtered or unexported fields
}
func New ¶
func New(ctx context.Context, tracer trace.Tracer, _ backend.DecryptCredentailFunc, url *url.URL) (*FileBackend, error)
func (FileBackend) Close ¶
func (FileBackend) Close() error
func (*FileBackend) CreateObject ¶
func (self *FileBackend) CreateObject(ctx context.Context, req schema.CreateObjectRequest) (*schema.Object, error)
Create object in the backend
func (FileBackend) DeleteObjects ¶
func (self FileBackend) DeleteObjects(ctx context.Context, req schema.DeleteObjectsRequest) error
Delete objects in the backend (single object or prefix)
func (*FileBackend) GetObject ¶
func (self *FileBackend) GetObject(ctx context.Context, req schema.GetObjectRequest) (*schema.Object, error)
Get object metadata from the backend
func (FileBackend) ListObjects ¶
func (self FileBackend) ListObjects(ctx context.Context, iterator *schema.ObjectListIterator) (err error)
List objects or directories in the backend
func (*FileBackend) Name ¶
func (self *FileBackend) Name() string
Name returns the name of the backend
func (*FileBackend) ReadObject ¶
func (self *FileBackend) ReadObject(ctx context.Context, req schema.GetObjectRequest) (io.ReadCloser, *schema.Object, error)
Read object content from the backend. Caller must close the returned reader.
func (*FileBackend) URL ¶
func (self *FileBackend) URL() *url.URL
URL returns the backend destination URL. The scheme, host (bucket/name), and path (prefix/directory) identify the storage location. Query parameters carry useful non-credential details: region, endpoint, anonymous.
type WritableFS ¶ added in v0.2.14
type WritableFS interface {
fs.FS
Root() string
Create(name string) (*os.File, error)
Chtimes(name string, atime, mtime time.Time) error
MkdirAll(name string, perm fs.FileMode) error
Remove(name string) error
RemoveAll(name string) error
}
WritableFS extends fs.FS with write operations against a rooted directory.
Click to show internal directories.
Click to hide internal directories.