Documentation
¶
Index ¶
- func PrivateKey(keyPath string) (ed25519.PrivateKey, error)
- type Upload
- func BlobsUpload(mods *tools.Modules, destination string) (Upload, error)
- func BuildAPIModuleUploads(mods *build.Modules, namespace string) []Upload
- func DebugBinaryUploads(mods *build.Modules, debugNamespace, buildidNamespace string) ([]Upload, []string, error)
- func HostTestUploads(testSpecs []build.TestSpec, buildDir, namespace string) ([]Upload, error)
- func ImageUploads(mods *build.Modules, namespace string) ([]Upload, error)
- func JiriSnapshotUpload(mods *build.Modules, namespace string) (*Upload, error)
- func PublicKeyUpload(namespace string, publicKey ed25519.PublicKey) (*Upload, error)
- func SDKArchiveUploads(mods *build.Modules, namespace string) []Upload
- func Sign(uploads []Upload, privateKey ed25519.PrivateKey) ([]Upload, error)
- func ToolUploads(mods *build.Modules, namespace string) []Upload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrivateKey ¶
func PrivateKey(keyPath string) (ed25519.PrivateKey, error)
PrivateKey parses an ed25519 private key from a pem-formatted key file. It expects the key to be in a PKCS#8, ASN.1 DER format as generated by running `openssl genpkey -algorithm ed25519 -out <private key>.pem`.
Types ¶
type Upload ¶
type Upload struct { // Source is the path to the local file to upload. Source string // Destination is the path to upload to relative to a gcs bucket and namespace. Destination string // Compress is a directive to gzip the object before uploading. Compress bool // Contents contains the contents to upload to Destination. This field // will only be used if Source is empty. Contents []byte // Deduplicate gives a collision strategy. If true, then an upload should // not fail in the event of a collision, allowing for deduplication of, for // example, content-addressed uploads. Deduplicate bool // Recursive tells whether to recursively upload all files in Source if // Source is a directory. Recursive bool // Metadata contains the metadata to be uploaded with the file. Metadata map[string]string // TarHeader tells whether or not to compress with tar and contains the // associated header. TarHeader *tar.Header }
Upload is a struct that contains source and destination paths to files to upload to GCS.
func BlobsUpload ¶
BlobsUpload parses all the package manifests in the build and returns an Upload for all the blobs.
func BuildAPIModuleUploads ¶
BuildAPIModuleUploads returns a set of Uploads corresponding to the collection of build API modules in the build.
func DebugBinaryUploads ¶
func DebugBinaryUploads(mods *build.Modules, debugNamespace, buildidNamespace string) ([]Upload, []string, error)
DebugBinaryUploads parses the binary manifest associated to a build and returns a list of Uploads of debug binaries and a list of associated fuchsia build IDs.
func HostTestUploads ¶
HostTestUploads returns a set of Uploads corresponding to the host tests in testSpecs.
func ImageUploads ¶
ImageUploads parses the image manifest located in the build and returns a list of Uploads for the images used for testing.
func JiriSnapshotUpload ¶
JiriSnapshotUpload returns an upload object representing a jiri snapshot.
func PublicKeyUpload ¶
PublicKeyUpload returns an Upload representing the public key used for release builds.