Worker ------ Add configuration for the default container registry. Use the default container registry if not provided as part of the image name. When using the default registry use the configured values Return the image url as part of the result. Composer Worker API ------------------- Add `ContainerTargetResultOptions` to return the image url Composer API ------------ Add UploadOptions to allow setting of the image name and tag Add UploadStatus to return the url of the uploaded image Co-Developed-By: Christian Kellner <christian@kellner.me>
29 lines
776 B
Go
29 lines
776 B
Go
package target
|
|
|
|
const TargetNameContainer TargetName = "org.osbuild.container"
|
|
|
|
type ContainerTargetOptions struct {
|
|
Reference string `json:"reference"`
|
|
|
|
Username string `json:"username,omitempty"`
|
|
Password string `json:"password,omitempty"`
|
|
|
|
TlsVerify *bool `json:"tls_verify,omitempty"`
|
|
}
|
|
|
|
func (ContainerTargetOptions) isTargetOptions() {}
|
|
|
|
func NewContainerTarget(options *ContainerTargetOptions) *Target {
|
|
return newTarget(TargetNameContainer, options)
|
|
}
|
|
|
|
type ContainerTargetResultOptions struct {
|
|
URL string `json:"url"`
|
|
Digest string `json:"digest"`
|
|
}
|
|
|
|
func (ContainerTargetResultOptions) isTargetResultOptions() {}
|
|
|
|
func NewContainerTargetResult(options *ContainerTargetResultOptions) *TargetResult {
|
|
return newTargetResult(TargetNameContainer, options)
|
|
}
|