Documentation ¶
Index ¶
- func ArchiveAndUploadFilesToS3(fileTree fs.FS, names []string, s3Base string, logger *zap.SugaredLogger) error
- func ArchiveAndUploadFilesToSpecifiedS3(fileTree fs.FS, names []string, s3Base, s3Id string, logger *zap.SugaredLogger) error
- func DeleteArchivedFileFromS3(names []string, s3Base string, logger *zap.SugaredLogger) error
- func DownloadAndExtractFilesFromS3(name, localBase, s3Base string, logger *zap.SugaredLogger) error
- func DownloadFileFromSource(args *DownloadFromSourceArgs) ([]byte, error)
- func DownloadFilesFromSource(args *DownloadFromSourceArgs, rootNameGetter func(afero.Fs) (string, error)) (fs.FS, error)
- func PreloadFiles(name, localBase, s3Base string, logger *zap.SugaredLogger) error
- func SaveAndUploadFiles(fileTree fs.FS, names []string, localBase, s3Base string, ...) error
- type DownloadFromSourceArgs
- type FileInfo
- type TreeGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArchiveAndUploadFilesToSpecifiedS3 ¶ added in v1.8.0
func DeleteArchivedFileFromS3 ¶
func DeleteArchivedFileFromS3(names []string, s3Base string, logger *zap.SugaredLogger) error
func DownloadAndExtractFilesFromS3 ¶
func DownloadAndExtractFilesFromS3(name, localBase, s3Base string, logger *zap.SugaredLogger) error
func DownloadFileFromSource ¶ added in v1.5.0
func DownloadFileFromSource(args *DownloadFromSourceArgs) ([]byte, error)
func DownloadFilesFromSource ¶
func PreloadFiles ¶
func PreloadFiles(name, localBase, s3Base string, logger *zap.SugaredLogger) error
PreloadFiles downloads a tarball from object storage and extracts it to a local path for further usage. It happens only if files do not exist in local disk.
func SaveAndUploadFiles ¶
func SaveAndUploadFiles(fileTree fs.FS, names []string, localBase, s3Base string, logger *zap.SugaredLogger) error
SaveAndUploadFiles saves a tree of files to local disk, at the same time, archives them and uploads to object storage.
Types ¶
type DownloadFromSourceArgs ¶
type FileInfo ¶
type TreeGetter ¶ added in v1.5.0
type TreeGetter interface { GetTreeContents(owner, repo, path, branch string) (afero.Fs, error) GetFileContent(owner, repo, path, branch string) ([]byte, error) GetTree(owner, repo, path, branch string) ([]*git.TreeNode, error) }
func GetPublicTreeGetter ¶ added in v1.5.0
func GetPublicTreeGetter(repoLink string) (TreeGetter, error)
func GetTreeGetter ¶ added in v1.5.0
func GetTreeGetter(codeHostID int) (TreeGetter, error)
Click to show internal directories.
Click to hide internal directories.