finder

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: AGPL-3.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IFinder

type IFinder interface {
	ListDir(dir string) ([]string, error)
	Download(src, dst string) (int64, error)
	GetUpdateTime(filepath string) int64
	GetETag(filepath string) string
}

func GetFinder

func GetFinder(cfg *commonconfig.FinderConfig) IFinder

type LocalFinder added in v0.0.5

type LocalFinder struct {
	Config *commonconfig.FinderConfig
}

func NewLocalFinder added in v0.0.5

func NewLocalFinder(conf *commonconfig.FinderConfig) *LocalFinder

func (*LocalFinder) Download added in v0.0.5

func (finder *LocalFinder) Download(src, dst string) (int64, error)

func (*LocalFinder) GetETag added in v0.0.8

func (finder *LocalFinder) GetETag(filepath string) string

func (*LocalFinder) GetUpdateTime added in v0.0.5

func (finder *LocalFinder) GetUpdateTime(filepath string) int64

func (*LocalFinder) ListDir added in v0.0.5

func (finder *LocalFinder) ListDir(dir string) ([]string, error)

type OSSFinder

type OSSFinder struct {
	Config *commonconfig.FinderConfig
}

func NewOSSFinder

func NewOSSFinder(conf *commonconfig.FinderConfig) *OSSFinder

func (*OSSFinder) Download

func (finder *OSSFinder) Download(src, dst string) (int64, error)

func (*OSSFinder) GetETag added in v0.0.8

func (finder *OSSFinder) GetETag(filepath string) string

func (*OSSFinder) GetLocalETag added in v0.0.8

func (finder *OSSFinder) GetLocalETag(filepath string) string

func (*OSSFinder) GetUpdateTime

func (finder *OSSFinder) GetUpdateTime(filepath string) int64

func (*OSSFinder) ListDir

func (finder *OSSFinder) ListDir(dir string) ([]string, error)

type S3Finder

type S3Finder struct {
	Config  *commonconfig.FinderConfig
	Session *session.Session
}

func NewS3Finder

func NewS3Finder(conf *commonconfig.FinderConfig) *S3Finder

func (*S3Finder) Download

func (finder *S3Finder) Download(src, dst string) (int64, error)

func (*S3Finder) GetETag added in v0.0.8

func (finder *S3Finder) GetETag(filepath string) string

func (*S3Finder) GetUpdateTime

func (finder *S3Finder) GetUpdateTime(filepath string) int64

func (*S3Finder) ListDir

func (finder *S3Finder) ListDir(dir string) ([]string, error)

Jump to

Keyboard shortcuts

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