local

package
v3.37.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: AGPL-3.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSnapshot added in v3.12.0

func GetSnapshot(videoPath string, frameNum int) (imgData *bytes.Buffer, err error)

Types

type Addition

type Addition struct {
	driver.RootPath
	Thumbnail        bool   `json:"thumbnail" required:"true" help:"enable thumbnail"`
	ThumbCacheFolder string `json:"thumb_cache_folder"`
	ThumbConcurrency string `` /* 179-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 Local

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

func (*Local) Config

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

func (*Local) Copy

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

func (*Local) Drop

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

func (*Local) FileInfoToObj added in v3.25.0

func (d *Local) FileInfoToObj(f fs.FileInfo, reqPath string, fullPath string) model.Obj

func (*Local) Get

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

func (*Local) GetAddition

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

func (*Local) GetMeta added in v3.25.0

func (d *Local) GetMeta(ctx context.Context, path string) (model.Obj, error)

func (*Local) Init

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 (*Local) List

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

func (*Local) MakeDir

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

func (*Local) Move

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

func (*Local) Put

func (d *Local) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error

func (*Local) Remove

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

func (*Local) Rename

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

type NopTokenBucket added in v3.37.0

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

NopTokenBucket all function calls to this bucket will success immediately

func NewNopTokenBucket added in v3.37.0

func NewNopTokenBucket() NopTokenBucket

func (NopTokenBucket) Do added in v3.37.0

func (b NopTokenBucket) Do(_ context.Context, f func() error) error

func (NopTokenBucket) Put added in v3.37.0

func (b NopTokenBucket) Put()

func (NopTokenBucket) Take added in v3.37.0

func (b NopTokenBucket) Take() <-chan struct{}

type StaticTokenBucket added in v3.37.0

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 added in v3.37.0

func NewStaticTokenBucket(size int) StaticTokenBucket

func (StaticTokenBucket) Do added in v3.37.0

func (b StaticTokenBucket) Do(ctx context.Context, f func() error) error

func (StaticTokenBucket) Put added in v3.37.0

func (b StaticTokenBucket) Put()

func (StaticTokenBucket) Take added in v3.37.0

func (b StaticTokenBucket) Take() <-chan struct{}

type TokenBucket added in v3.37.0

type TokenBucket interface {
	Take() <-chan struct{}
	Put()
	Do(context.Context, func() error) error
}

Jump to

Keyboard shortcuts

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