artifacts

package
v0.0.0-...-cbd771f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDownloadArtifactSignedURL

func BuildDownloadArtifactSignedURL(baseURL, name, buildID, target string) string

Types

type AndroidCIBuildAPI

type AndroidCIBuildAPI struct {
	BaseURL string
	// contains filtered or unexported fields
}

func NewAndroidCIBuildAPI

func NewAndroidCIBuildAPI(client *http.Client, baseURL string) *AndroidCIBuildAPI

func NewAndroidCIBuildAPIWithOpts

func NewAndroidCIBuildAPIWithOpts(client *http.Client, baseURL string, opts AndroidCIBuildAPIOpts) *AndroidCIBuildAPI

func (*AndroidCIBuildAPI) DownloadArtifact

func (s *AndroidCIBuildAPI) DownloadArtifact(name, buildID, target string, dst io.Writer) error

func (*AndroidCIBuildAPI) GetLatestGreenBuildID

func (s *AndroidCIBuildAPI) GetLatestGreenBuildID(branch, target string) (string, error)

type AndroidCIBuildAPIOpts

type AndroidCIBuildAPIOpts struct {
	Credentials string
}

type BuildAPI

type BuildAPI interface {
	// Gets the latest green build ID for a given branch and target.
	GetLatestGreenBuildID(branch, target string) (string, error)

	// Downloads the specified artifact
	DownloadArtifact(name, buildID, target string, dst io.Writer) error
}

type BuildAPIError

type BuildAPIError struct {
	Message string
	Code    int
}

func (*BuildAPIError) Error

func (e *BuildAPIError) Error() string

type CVDBundleFetcher

type CVDBundleFetcher interface {
	// Fetches all the necessary artifacts to launch a Cuttlefish device. It support downloading a system
	// image from a different build if the extraOptions is provided.
	Fetch(outDir, buildID, target string, extraOptions *ExtraCVDOptions) error
}

type ExtraCVDOptions

type ExtraCVDOptions struct {
	SystemImgBuildID string
	SystemImgTarget  string
}

type Fetcher

type Fetcher interface {
	// Fetches specific artifacts.
	Fetch(outDir, buildID, target string, artifacts ...string) error
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Downloads and organizes the Build artifacts.

Artifacts will be organized the following way:

  1. $ROOT_DIR/<BUILD_ID>_<TARGET>__cvd will store a full download.
  2. $ROOT_DIR/<BUILD_ID>_<TARGET>__kernel will store kernel artifacts only.

func NewManager

func NewManager(rootDir string, uuidGen func() string) *Manager

func (*Manager) GetBootloaderBundle

func (h *Manager) GetBootloaderBundle(buildID, target string, fetcher Fetcher) (string, error)

func (*Manager) GetCVDBundle

func (h *Manager) GetCVDBundle(
	buildID, target string, extraOptions *ExtraCVDOptions, fetcher CVDBundleFetcher) (string, error)

func (*Manager) GetKernelBundle

func (h *Manager) GetKernelBundle(buildID, target string, fetcher Fetcher) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL