debian-forge-composer/internal/target/gcp_target.go
Tomas Hozza 319400c280 cloudapi: implement GCP target results and include UploadOptions
Return GCP-specific target results form the worker, similar as it is
done for AWS.

Extend Cloud API to allow GCP-specific upload Options.

Modify Cloud API to return UploadOptions as part of the UploadStatus.

Modify Cloud API integration test to check returned upload Options and
upload Type.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-03-04 15:44:04 +01:00

27 lines
809 B
Go

package target
type GCPTargetOptions struct {
Filename string `json:"filename"`
Region string `json:"region"`
Os string `json:"os"` // not exposed in cloudapi for now
Bucket string `json:"bucket"`
Object string `json:"object"`
ShareWithAccounts []string `json:"shareWithAccounts"`
}
func (GCPTargetOptions) isTargetOptions() {}
func NewGCPTarget(options *GCPTargetOptions) *Target {
return newTarget("org.osbuild.gcp", options)
}
type GCPTargetResultOptions struct {
ImageName string `json:"image_name"`
ProjectID string `json:"project_id"`
}
func (GCPTargetResultOptions) isTargetResultOptions() {}
func NewGCPTargetResult(options *GCPTargetResultOptions) *TargetResult {
return newTargetResult("org.osbuild.gcp", options)
}