finder

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: GPL-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
	GetMD5(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) GetMD5 added in v0.0.7

func (finder *LocalFinder) GetMD5(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) GetMD5 added in v0.0.7

func (finder *OSSFinder) GetMD5(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) GetMD5 added in v0.0.7

func (finder *S3Finder) GetMD5(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