filelu

package
v1.70.3 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package filelu provides an interface to the FileLu storage system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFs

func NewFs(ctx context.Context, name string, root string, m configmap.Mapper) (fs.Fs, error)

NewFs creates a new Fs object for FileLu

Types

type Fs

type Fs struct {
	// contains filtered or unexported fields
}

Fs represents the FileLu file system

func (*Fs) About

func (f *Fs) About(ctx context.Context) (*fs.Usage, error)

About provides usage statistics for the remote

func (*Fs) Features

func (f *Fs) Features() *fs.Features

Features returns the optional features of this Fs

func (*Fs) Hashes

func (f *Fs) Hashes() hash.Set

Hashes returns an empty hash set, indicating no hash support

func (*Fs) List

func (f *Fs) List(ctx context.Context, dir string) (fs.DirEntries, error)

List returns a list of files and folders List returns a list of files and folders for the given directory

func (*Fs) Mkdir

func (f *Fs) Mkdir(ctx context.Context, dir string) error

Mkdir to create directory on remote server.

func (*Fs) Move

func (f *Fs) Move(ctx context.Context, src fs.Object, destinationPath string) (fs.Object, error)

Move moves the file to the specified location

func (*Fs) Name

func (f *Fs) Name() string

Name returns the remote name

func (*Fs) NewObject

func (f *Fs) NewObject(ctx context.Context, remote string) (fs.Object, error)

NewObject creates a new Object for the given remote path

func (*Fs) Precision

func (f *Fs) Precision() time.Duration

Precision returns the precision of the remote

func (*Fs) Purge

func (f *Fs) Purge(ctx context.Context, dir string) error

Purge deletes the directory and all its contents

func (*Fs) Put

func (f *Fs) Put(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.Object, error)

Put uploads a file directly to the destination folder in the FileLu storage system.

func (*Fs) Rmdir

func (f *Fs) Rmdir(ctx context.Context, dir string) error

Rmdir removes a directory

func (*Fs) Root

func (f *Fs) Root() string

Root returns the root path

func (*Fs) String

func (f *Fs) String() string

type Object

type Object struct {
	// contains filtered or unexported fields
}

Object describes a FileLu object

func (*Object) Fs

func (o *Object) Fs() fs.Info

Fs returns the parent Fs

func (*Object) Hash

func (o *Object) Hash(ctx context.Context, t hash.Type) (string, error)

Hash returns the MD5 hash of an object

func (*Object) ModTime

func (o *Object) ModTime(ctx context.Context) time.Time

ModTime returns the modification time of the object

func (*Object) Open

func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (io.ReadCloser, error)

Open opens the object for reading

func (*Object) Remote

func (o *Object) Remote() string

Remote returns the remote path

func (*Object) Remove

func (o *Object) Remove(ctx context.Context) error

Remove deletes the object from FileLu

func (*Object) SetModTime

func (o *Object) SetModTime(ctx context.Context, modTime time.Time) error

SetModTime sets the modification time of the object

func (*Object) Size

func (o *Object) Size() int64

Size returns the size of the object

func (*Object) Storable

func (o *Object) Storable() bool

Storable indicates whether the object is storable

func (*Object) String

func (o *Object) String() string

String returns a string representation of the object

func (*Object) Update

func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) error

Update updates the object with new data

type Options

type Options struct {
	Key string               `config:"key"`
	Enc encoder.MultiEncoder `config:"encoding"`
}

Options defines the configuration for the FileLu backend

Directories

Path Synopsis
Package api defines types for interacting with the FileLu API.
Package api defines types for interacting with the FileLu API.

Jump to

Keyboard shortcuts

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