alias

package
v4.1.9 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: AGPL-3.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DisabledWP             = "disabled"
	FirstRWP               = "first"
	DeterministicWP        = "deterministic"
	DeterministicOrAllWP   = "deterministic_or_all"
	AllRWP                 = "all"
	AllStrictWP            = "all_strict"
	RandomBalancedRP       = "random"
	BalancedByQuotaP       = "quota"
	BalancedByQuotaStrictP = "quota_strict"
)

Variables

View Source
var (
	ErrPathConflict     = errors.New("path conflict")
	ErrSamePathLeak     = errors.New("leak some of same-name dirs")
	ErrNoEnoughSpace    = errors.New("none of same-name dirs has enough space")
	ErrNotEnoughSrcObjs = errors.New("cannot move fewer objs to more paths, please try copying")
)

Functions

This section is empty.

Types

type Addition

type Addition struct {
	Paths                string `json:"paths" required:"true" type:"text"`
	ReadConflictPolicy   string `json:"read_conflict_policy" type:"select" options:"first,random,all" default:"first"`
	WriteConflictPolicy  string `` /* 238-byte string literal not displayed */
	PutConflictPolicy    string `` /* 265-byte string literal not displayed */
	FileConsistencyCheck bool   `json:"file_consistency_check" type:"bool" default:"false"`
	DownloadConcurrency  int    `json:"download_concurrency" default:"0" required:"false" type:"number" help:"Need to enable proxy"`
	DownloadPartSize     int    `json:"download_part_size" default:"0" type:"number" required:"false" help:"Need to enable proxy. Unit: KB"`
	ProviderPassThrough  bool   `json:"provider_pass_through" type:"bool" default:"false"`
	DetailsPassThrough   bool   `json:"details_pass_through" type:"bool" default:"false"`
}

type Alias

type Alias struct {
	model.Storage
	Addition
	// contains filtered or unexported fields
}

func (*Alias) ArchiveDecompress

func (d *Alias) ArchiveDecompress(ctx context.Context, srcObj, dstDir model.Obj, args model.ArchiveDecompressArgs) error

func (*Alias) Config

func (d *Alias) Config() driver.Config

func (*Alias) Copy

func (d *Alias) Copy(ctx context.Context, srcObj, dstDir model.Obj) error

func (*Alias) Drop

func (d *Alias) Drop(ctx context.Context) error

func (*Alias) Extract

func (d *Alias) Extract(ctx context.Context, obj model.Obj, args model.ArchiveInnerArgs) (*model.Link, error)

func (*Alias) Get

func (d *Alias) Get(ctx context.Context, path string) (model.Obj, error)

通过op.Get调用的话,path一定是子路径(/开头)

func (*Alias) GetAddition

func (d *Alias) GetAddition() driver.Additional

func (*Alias) GetArchiveMeta

func (d *Alias) GetArchiveMeta(ctx context.Context, obj model.Obj, args model.ArchiveArgs) (model.ArchiveMeta, error)

func (*Alias) GetRoot added in v4.1.9

func (d *Alias) GetRoot(ctx context.Context) (model.Obj, error)

func (*Alias) Init

func (d *Alias) Init(ctx context.Context) error
func (d *Alias) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)

func (*Alias) List

func (d *Alias) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)

func (*Alias) ListArchive

func (d *Alias) ListArchive(ctx context.Context, obj model.Obj, args model.ArchiveInnerArgs) ([]model.Obj, error)

func (*Alias) MakeDir

func (d *Alias) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error

func (*Alias) Move

func (d *Alias) Move(ctx context.Context, srcObj, dstDir model.Obj) error

func (*Alias) Other added in v4.1.3

func (d *Alias) Other(ctx context.Context, args model.OtherArgs) (interface{}, error)

func (*Alias) Put

func (*Alias) PutURL

func (d *Alias) PutURL(ctx context.Context, dstDir model.Obj, name, url string) error

func (*Alias) Remove

func (d *Alias) Remove(ctx context.Context, obj model.Obj) error

func (*Alias) Rename

func (d *Alias) Rename(ctx context.Context, srcObj model.Obj, newName string) error

func (*Alias) ResolveLinkCacheMode added in v4.1.5

func (d *Alias) ResolveLinkCacheMode(path string) driver.LinkCacheMode

type BalancedObjs added in v4.1.9

type BalancedObjs []model.Obj

func (BalancedObjs) CreateTime added in v4.1.9

func (b BalancedObjs) CreateTime() time.Time

func (BalancedObjs) GetHash added in v4.1.9

func (b BalancedObjs) GetHash() utils.HashInfo

func (BalancedObjs) GetID added in v4.1.9

func (b BalancedObjs) GetID() string

func (BalancedObjs) GetName added in v4.1.9

func (b BalancedObjs) GetName() string

func (BalancedObjs) GetPath added in v4.1.9

func (b BalancedObjs) GetPath() string

func (BalancedObjs) GetSize added in v4.1.9

func (b BalancedObjs) GetSize() int64

func (BalancedObjs) IsDir added in v4.1.9

func (b BalancedObjs) IsDir() bool

func (BalancedObjs) ModTime added in v4.1.9

func (b BalancedObjs) ModTime() time.Time

func (BalancedObjs) Unwrap added in v4.1.9

func (b BalancedObjs) Unwrap() model.Obj

Jump to

Keyboard shortcuts

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