alist

package
v1.73.2-bclone Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package alist implements an rclone backend for AList

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFs

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

NewFs constructs an Fs from the path, container:path.

Types

type Fs

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

Fs represents a remote AList server.

func (*Fs) Features

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

Features returns the Fs features

func (*Fs) Hashes

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

func (*Fs) List

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

List lists the objects and directories in dir.

func (*Fs) Mkdir

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

Mkdir creates a directory.

func (*Fs) Name

func (f *Fs) Name() string

Name of the remote (as passed into NewFs)

func (*Fs) NewObject

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

func (*Fs) Precision

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

func (*Fs) Put

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

Put uploads an object to the remote.

func (*Fs) Rmdir

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

Rmdir removes an empty directory.

func (*Fs) Root

func (f *Fs) Root() string

Root of the remote (as passed into NewFs)

func (*Fs) String

func (f *Fs) String() string

type Object

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

Object describes an AList object.

func (*Object) Fs

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

func (*Object) Hash

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

func (*Object) Hashes

func (o *Object) Hashes() hash.Set

func (*Object) ModTime

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

func (*Object) Open

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

Open retrieves the raw download URL and uses doCFRequest to handle CF challenges.

func (*Object) Remote

func (o *Object) Remote() string

func (*Object) Remove

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

func (*Object) SetModTime

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

func (*Object) Size

func (o *Object) Size() int64

func (*Object) Storable

func (o *Object) Storable() bool

func (*Object) String

func (o *Object) String() string

func (*Object) Update

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

type Options

type Options struct {
	URL       string `config:"url"`
	Username  string `config:"username"`
	Password  string `config:"password"`
	OTPCode   string `config:"otp_code"`
	MetaPass  string `config:"meta_pass"`
	RootPath  string `config:"root_path"`
	CfServer  string `config:"cf_server"`
	UserAgent string `config:"user_agent"`
}

Options defines the configuration for this backend.

Jump to

Keyboard shortcuts

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