Documentation
¶
Index ¶
- type Addition
- type DirectoryMap
- func (m *DirectoryMap) CalculateDirSize(dirname string) (int64, error)
- func (m *DirectoryMap) Clear()
- func (m *DirectoryMap) Delete(path string)
- func (m *DirectoryMap) DeleteDirNode(dirname string) error
- func (m *DirectoryMap) Get(path string) (*DirectoryNode, bool)
- func (m *DirectoryMap) Has(path string) bool
- func (m *DirectoryMap) RecalculateDirSize() error
- func (m *DirectoryMap) Set(path string, node *DirectoryNode)
- func (m *DirectoryMap) UpdateDirParents(dirname string) error
- func (m *DirectoryMap) UpdateDirSize(dirname string) (int64, error)
- type DirectoryNode
- type DirectoryTask
- type DirectoryTaskCache
- type Local
- func (d *Local) Config() driver.Config
- func (d *Local) Copy(_ context.Context, srcObj, dstDir model.Obj) error
- func (d *Local) Drop(ctx context.Context) error
- func (d *Local) FileInfoToObj(ctx context.Context, f fs.FileInfo, reqPath string, fullPath string) model.Obj
- func (d *Local) Get(ctx context.Context, path string) (model.Obj, error)
- func (d *Local) GetAddition() driver.Additional
- func (d *Local) GetDetails(ctx context.Context) (*model.StorageDetails, error)
- func (d *Local) GetSnapshot(videoPath string) (imgData *bytes.Buffer, err error)
- func (d *Local) Init(ctx context.Context) error
- func (d *Local) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
- func (d *Local) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (d *Local) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error
- func (d *Local) Move(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *Local) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, ...) error
- func (d *Local) Remove(ctx context.Context, obj model.Obj) error
- func (d *Local) Rename(ctx context.Context, srcObj model.Obj, newName string) error
- type NopTokenBucket
- type StaticTokenBucket
- type TokenBucket
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addition ¶
type Addition struct {
driver.RootPath
DirectorySize bool `json:"directory_size" default:"false" help:"This might impact host performance"`
Thumbnail bool `json:"thumbnail" required:"true" help:"enable thumbnail"`
ThumbCacheFolder string `json:"thumb_cache_folder"`
ThumbConcurrency string `` /* 179-byte string literal not displayed */
VideoThumbPos string `` /* 266-byte string literal not displayed */
ShowHidden bool `json:"show_hidden" default:"true" required:"false" help:"show hidden directories and files"`
MkdirPerm string `json:"mkdir_perm" default:"777"`
RecycleBinPath string `` /* 137-byte string literal not displayed */
}
type DirectoryMap ¶ added in v4.1.1
type DirectoryMap struct {
// contains filtered or unexported fields
}
func (*DirectoryMap) CalculateDirSize ¶ added in v4.1.1
func (m *DirectoryMap) CalculateDirSize(dirname string) (int64, error)
func (*DirectoryMap) Clear ¶ added in v4.1.1
func (m *DirectoryMap) Clear()
func (*DirectoryMap) Delete ¶ added in v4.1.1
func (m *DirectoryMap) Delete(path string)
func (*DirectoryMap) DeleteDirNode ¶ added in v4.1.1
func (m *DirectoryMap) DeleteDirNode(dirname string) error
func (*DirectoryMap) Get ¶ added in v4.1.1
func (m *DirectoryMap) Get(path string) (*DirectoryNode, bool)
func (*DirectoryMap) Has ¶ added in v4.1.1
func (m *DirectoryMap) Has(path string) bool
func (*DirectoryMap) RecalculateDirSize ¶ added in v4.1.1
func (m *DirectoryMap) RecalculateDirSize() error
func (*DirectoryMap) Set ¶ added in v4.1.1
func (m *DirectoryMap) Set(path string, node *DirectoryNode)
func (*DirectoryMap) UpdateDirParents ¶ added in v4.1.1
func (m *DirectoryMap) UpdateDirParents(dirname string) error
func (*DirectoryMap) UpdateDirSize ¶ added in v4.1.1
func (m *DirectoryMap) UpdateDirSize(dirname string) (int64, error)
type DirectoryNode ¶ added in v4.1.1
type DirectoryNode struct {
// contains filtered or unexported fields
}
type DirectoryTask ¶ added in v4.1.1
type DirectoryTask struct {
// contains filtered or unexported fields
}
type DirectoryTaskCache ¶ added in v4.1.1
type DirectoryTaskCache struct {
// contains filtered or unexported fields
}
type Local ¶
func (*Local) FileInfoToObj ¶
func (*Local) GetAddition ¶
func (d *Local) GetAddition() driver.Additional
func (*Local) GetDetails ¶ added in v4.1.4
func (*Local) GetSnapshot ¶
Get the snapshot of the video
type NopTokenBucket ¶
type NopTokenBucket struct {
// contains filtered or unexported fields
}
NopTokenBucket all function calls to this bucket will success immediately
func NewNopTokenBucket ¶
func NewNopTokenBucket() NopTokenBucket
func (NopTokenBucket) Put ¶
func (b NopTokenBucket) Put()
func (NopTokenBucket) Take ¶
func (b NopTokenBucket) Take() <-chan struct{}
type StaticTokenBucket ¶
type StaticTokenBucket struct {
// contains filtered or unexported fields
}
StaticTokenBucket is a bucket with a fixed number of tokens, where the retrieval and return of tokens are manually controlled. In the initial state, the bucket is full.
func NewStaticTokenBucket ¶
func NewStaticTokenBucket(size int) StaticTokenBucket
func NewStaticTokenBucketWithMigration ¶
func NewStaticTokenBucketWithMigration(oldBucket TokenBucket, size int) StaticTokenBucket
func (StaticTokenBucket) Do ¶
func (b StaticTokenBucket) Do(ctx context.Context, f func() error) error
func (StaticTokenBucket) Put ¶
func (b StaticTokenBucket) Put()
func (StaticTokenBucket) Take ¶
func (b StaticTokenBucket) Take() <-chan struct{}
Take channel maybe closed when local driver is modified. don't call Put method after the channel is closed.
Click to show internal directories.
Click to hide internal directories.