files

package
v0.0.0-...-89235d8 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CachePath     = "/mnt/cache/"
	ElasticURLFmt = "https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-%s-no-jdk-windows-x86_64.zip"
	JavaURL       = "" /* 129-byte string literal not displayed */
)

Variables

View Source
var (
	DownloadPath           = "./downloads"
	Bucket                 = ""
	Prefix                 = ""
	WindowsDir             = "./JSTOR-Windows"
	ChromebookDir          = "./JSTOR-Chromebook"
	MacDir                 = "./JSTOR-Mac"
	JSTORDir               = "JSTOR"
	ContentDir             = "content"
	PDFDir                 = "pdfs"
	InstallGuideDir        = "./install_guides"
	ChromebookInstallGuide = filepath.Join(InstallGuideDir, "chromebook/README.pdf")
	WindowsInstallGuide    = filepath.Join(InstallGuideDir, "windows/README.pdf")
	ShellDir               = "./shell"
	WindowsShell           = filepath.Join(ShellDir, "start.bat")
	ChromebookShell        = filepath.Join(ShellDir, "start.sh")
	MacShell               = filepath.Join(ShellDir, "start.command")
	FrontendDir            = "dist"
)

Functions

func CopyFile

func CopyFile(src, dst string) error

func CopyRecursive

func CopyRecursive(src, dst string) error

func CreateS3Session

func CreateS3Session() (*session.Session, error)

func DownloadBucket

func DownloadBucket(bucket string, prefix string, dir string) error

func DownloadFile

func DownloadFile(url, filename string) (string, error)

func GetElasticURL

func GetElasticURL(version string) string

func Untar

func Untar(dst string, r io.Reader) ([]string, error)

func Unzip

func Unzip(src string, dest string) ([]string, error)

Unzip will take a zip file path as src, and unzip it to the dest

Types

type S3Downloader

type S3Downloader struct {
	DLManager *s3manager.Downloader
	Bucket    string
	Dir       string
}

func (*S3Downloader) DownloadToFile

func (d *S3Downloader) DownloadToFile(key string) error

func (*S3Downloader) EachPage

func (d *S3Downloader) EachPage(page *s3.ListObjectsOutput, more bool) bool

Jump to

Keyboard shortcuts

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