Documentation ¶
Index ¶
- func PrivateKey(keyPath string) (ed25519.PrivateKey, error)
- type Data
- type Image
- type Package
- type ProductBundle
- type Upload
- func BlobsUpload(mods *tools.Modules, destination string) (Upload, error)
- func BuildAPIModuleUploads(mods *build.Modules, namespace string) []Upload
- func DebugBinaryUploads(ctx context.Context, mods *build.Modules, ...) ([]Upload, map[string]string, []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 ProductBundleUploads(mods *build.Modules, ...) (*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 Data ¶
type Data struct { DeviceRefs json.RawMessage `json:"device_refs"` Images []*Image `json:"images"` Type json.RawMessage `json:"type"` Name json.RawMessage `json:"name"` Packages []*Package `json:"packages"` Description json.RawMessage `json:"description"` Metadata json.RawMessage `json:"metadata,omitempty"` Manifests json.RawMessage `json:"manifests,omitempty"` }
Data contained in the product bundle.
type Package ¶
type Package struct { Format string `json:"format"` BlobURI string `json:"blob_uri,omitempty"` RepoURI string `json:"repo_uri"` }
A set of artifacts necessary to run a physical or virtual device.
type ProductBundle ¶
ProductBundle is a struct that contains a collection of images and packages that are outputted from a product build.
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(ctx context.Context, mods *build.Modules, debugNamespace, buildidNamespace string) ([]Upload, map[string]string, []string, error)
DebugBinaryUploads parses the binary manifest associated to a build and returns a list of Uploads of debug binaries, a mapping of build IDs to binary labels, 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 ProductBundleUploads ¶
func ProductBundleUploads(mods *build.Modules, packageNamespaceDir, blobNamespaceDir, imageNamespaceDir string) (*Upload, error)
ProductBundleUploads parses the image manifest located in the build and returns a list of Uploads containing only product bundles with updated relative URI's based on artifactory's structure.
func PublicKeyUpload ¶
PublicKeyUpload returns an Upload representing the public key used for release builds.