Documentation ¶
Overview ¶
Package uploader uploads local files/directories to CAS.
Index ¶
Constants ¶
View Source
const ( // Sha256HeaderID is a custom Header ID for the `extra` field in the file header to store the SHA // checksum. It is defined in build/soong/zip/zip.go Sha256HeaderID = 0x4967 // Sha256HeaderSignature is the signature to verify that the extra data block is used to store the // SHA checksum. It is defined in build/soong/zip/zip.go Sha256HeaderSignature = 0x9514 // XattrDigestName is the xattr name for the object digest. It is used by Remote API Sdks to get // the file digest without loading actual file content. XattrDigestName = "user.digest.sha256" // XattrSrcZipPath is the xattr name for the path in zip file. It maps the extracted file to the // compressed file inside the original zip. XattrSrcZipPath = "user.zip_src" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonConfig ¶
type CommonConfig struct {
// contains filtered or unexported fields
}
CommonConfig is the common configurations used for all kinds of uploders
func NewCommonConfig ¶
func NewCommonConfig(ctx context.Context, client *client.Client, excludeFilters []string, dumpFileDetails string) *CommonConfig
NewCommonConfig creates a common CAS uploader configuration.
type DirUploader ¶
type DirUploader struct { CommonConfig // contains filtered or unexported fields }
DirUploader is the uploader to upload a directory to CAS.
type Uploader ¶
type Uploader interface { // DoUpload uploads files/directories to CAS, and returns the digest of the root directory. DoUpload() (digest.Digest, error) }
Uploader is the common interface implemented by all kind of uploaders.
func NewDirUploader ¶
func NewDirUploader(config *CommonConfig, dirPath string, fileLoader fileLoader) Uploader
NewDirUploader creates a new directory uploader to upload a directory to CAS.
func NewZipUploader ¶
func NewZipUploader(config *CommonConfig, zipPath string) Uploader
NewZipUploader creates
type ZipUploader ¶
type ZipUploader struct { CommonConfig // contains filtered or unexported fields }
ZipUploader is the uploader to uploader the a zip
Click to show internal directories.
Click to hide internal directories.