Documentation ¶
Overview ¶
Package asset provides functionality to manage static assets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactBucketUploader ¶ added in v1.28.0
type ArtifactBucketUploader struct { // FS is the file system to use. FS afero.Fs // Upload is the function called when uploading a file. Upload func(path string, contents io.Reader) error // AssetDir is the directory to upload the hashed files to. AssetDir string // AssetMappingFileDir is the directory to upload the asset mapping file to. AssetMappingFileDir string }
ArtifactBucketUploader uploads local asset files.
func (*ArtifactBucketUploader) UploadFiles ¶ added in v1.28.0
func (u *ArtifactBucketUploader) UploadFiles(files []manifest.FileUpload) (string, error)
UploadFiles hashes each of the files specified in files and uploads them to the path "{AssetDir}/{hash}". After, it uploads a JSON file to AssetDir that maps the location of every file in the artifact bucket to its intended destination path in the service bucket. The path to the mapping file is returned along with an error, if any.
Click to show internal directories.
Click to hide internal directories.