Documentation ¶
Overview ¶
Package gcp implements GCP repository importer.
Index ¶
Constants ¶
View Source
const (
// RepoName contains the repository name.
RepoName = "GCP"
)
Variables ¶
This section is empty.
Functions ¶
func RunImageExportBuild ¶
func RunImageExportBuild(cloudBuildClient *cloudbuild.Service, sourceProjectName, sourceImageName, buildProjectName, targetGCSbucket string) error
RunImageExportBuild runs Cloud build to create a .tar.gz file containing disk image from a cloud image.
Types ¶
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
Image holds data related to GCP image.
func (*Image) Preprocess ¶
Preprocess creates tar.gz file from an image, copies to local storage and extracts it.
func (*Image) QuickSHA256Hash ¶
QuickSHA256Hash returns sha256 of custom properties of a GCP image.
func (*Image) RemotePath ¶
RemotePath returns remote path to a GCP image .tar.gz raw disk file.
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
Repo holds data related to a GCP repository.
func NewRepo ¶
func NewRepo(ctx context.Context, computeService *compute.Service, storageService *storage.Service, cloudBuildService *cloudbuild.Service, projectName, hashrGCPProject, hashrGCSBucket string) (*Repo, error)
NewRepo returns new instance of GCP repository.
func (*Repo) DiscoverRepo ¶
DiscoverRepo traverses GCP project and looks for images.
Click to show internal directories.
Click to hide internal directories.