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 CopyAndUploadFiles(names []string, localBase, s3Base, zipPath, currentChartPath string, ...) error
- func DeleteArchivedFileFromS3(names []string, s3Base string, logger *zap.SugaredLogger) error
- func DownloadAndCopyFilesFromGerrit(name, localBase string, logger *zap.SugaredLogger) error
- func DownloadAndCopyFilesFromGitee(name, localBase 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, source 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 CopyAndUploadFiles ¶
func CopyAndUploadFiles(names []string, localBase, s3Base, zipPath, currentChartPath string, logger *zap.SugaredLogger) error
CopyAndUploadFiles copy a tree of files to other dir, at the same time, archives them and uploads to object storage.
func DeleteArchivedFileFromS3 ¶
func DeleteArchivedFileFromS3(names []string, s3Base string, logger *zap.SugaredLogger) error
func DownloadAndCopyFilesFromGerrit ¶
func DownloadAndCopyFilesFromGerrit(name, localBase string, logger *zap.SugaredLogger) error
func DownloadAndCopyFilesFromGitee ¶
func DownloadAndCopyFilesFromGitee(name, localBase string, logger *zap.SugaredLogger) error
func DownloadAndExtractFilesFromS3 ¶
func DownloadAndExtractFilesFromS3(name, localBase, s3Base string, logger *zap.SugaredLogger) error
func DownloadFileFromSource ¶
func DownloadFileFromSource(args *DownloadFromSourceArgs) ([]byte, error)
func DownloadFilesFromSource ¶
func PreloadFiles ¶
func PreloadFiles(name, localBase, s3Base, source 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 DownloadFromSourceArgs struct { CodehostID int `json:"codeHostID"` Owner string `json:"owner"` Namespace string `json:"namespace"` Repo string `json:"repo"` Path string `json:"path"` Branch string `json:"branch"` RepoLink string `json:"repoLink"` }
func (*DownloadFromSourceArgs) GetNamespace ¶
func (args *DownloadFromSourceArgs) GetNamespace() string
type FileInfo ¶
type TreeGetter ¶
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) GetYAMLContents(owner, repo, path, branch string, isDir, split bool) ([]string, error) }
func GetPublicTreeGetter ¶
func GetPublicTreeGetter(repoLink string) (TreeGetter, error)
func GetTreeGetter ¶
func GetTreeGetter(codeHostID int) (TreeGetter, error)
Click to show internal directories.
Click to hide internal directories.