storage

package
v0.5.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(fileName string) (*os.File, error)

func FileExists

func FileExists(filename string) bool

func RemoveDir

func RemoveDir(dir string) error

Types

type Protocol

type Protocol string
const (
	S3 Protocol = "s3://"
)

type Provider

type Provider interface {
	DownloadModel(modelDir string, modelName string, storageUri string) error
}

type S3ObjectDownloader

type S3ObjectDownloader struct {
	StorageUri string
	ModelDir   string
	ModelName  string
	Bucket     string
	Prefix     string
	// contains filtered or unexported fields
}

func (*S3ObjectDownloader) Download

func (s *S3ObjectDownloader) Download(objects []s3manager.BatchDownloadObject) error

func (*S3ObjectDownloader) GetAllObjects

func (s *S3ObjectDownloader) GetAllObjects(s3Svc s3iface.S3API) ([]s3manager.BatchDownloadObject, error)

type S3Provider

type S3Provider struct {
	Client     s3iface.S3API
	Downloader s3manageriface.DownloadWithIterator
}

func (*S3Provider) DownloadModel

func (m *S3Provider) DownloadModel(modelDir string, modelName string, storageUri string) error

Jump to

Keyboard shortcuts

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