debian-forge-composer/internal/target/aws_target.go
Chloe Kaubisch f091af55d8 cloudapi: add targetresults
Add the TargetResult struct to OSBuildJobResult. Include the 'options'
interface on TargetResult to contain target-specific information,
for example amiID and region from AWS. Expose 'options' on a status
call as an UploadStatus field. Add logic to support AWS within this
format, which can be used as a template for other targets.
2021-03-02 13:22:11 +01:00

28 lines
816 B
Go

package target
type AWSTargetOptions struct {
Filename string `json:"filename"`
Region string `json:"region"`
AccessKeyID string `json:"accessKeyID"`
SecretAccessKey string `json:"secretAccessKey"`
Bucket string `json:"bucket"`
Key string `json:"key"`
ShareWithAccounts []string `json:"shareWithAccounts"`
}
func (AWSTargetOptions) isTargetOptions() {}
func NewAWSTarget(options *AWSTargetOptions) *Target {
return newTarget("org.osbuild.aws", options)
}
type AWSTargetResultOptions struct {
Ami string `json:"ami"`
Region string `json:"region"`
}
func (AWSTargetResultOptions) isTargetResultOptions() {}
func NewAWSTargetResult(options *AWSTargetResultOptions) *TargetResult {
return newTargetResult("org.osbuild.aws", options)
}