internal/target: add OCI object storage target
Uploads an OCI image to OCI object storage, and generates a pre-authenticated request for the object, which can be used to import it into custom images.
This commit is contained in:
parent
7259deea3a
commit
067366ed6a
7 changed files with 144 additions and 9 deletions
|
|
@ -29,3 +29,32 @@ func (OCITargetResultOptions) isTargetResultOptions() {}
|
|||
func NewOCITargetResult(options *OCITargetResultOptions) *TargetResult {
|
||||
return newTargetResult(TargetNameOCI, options)
|
||||
}
|
||||
|
||||
const TargetNameOCIObjectStorage TargetName = "org.osbuild.oci.objectstorage"
|
||||
|
||||
func NewOCIObjectStorageTarget(options *OCIObjectStorageTargetOptions) *Target {
|
||||
return newTarget(TargetNameOCIObjectStorage, options)
|
||||
}
|
||||
|
||||
type OCIObjectStorageTargetOptions struct {
|
||||
User string `json:"user"`
|
||||
Tenancy string `json:"tenancy"`
|
||||
Region string `json:"region"`
|
||||
Fingerprint string `json:"fingerprint"`
|
||||
PrivateKey string `json:"private_key"`
|
||||
Bucket string `json:"bucket"`
|
||||
Namespace string `json:"namespace"`
|
||||
Compartment string `json:"compartment_id"`
|
||||
}
|
||||
|
||||
func (OCIObjectStorageTargetOptions) isTargetOptions() {}
|
||||
|
||||
type OCIObjectStorageTargetResultOptions struct {
|
||||
URL string `json:"url"`
|
||||
}
|
||||
|
||||
func (OCIObjectStorageTargetResultOptions) isTargetResultOptions() {}
|
||||
|
||||
func NewOCIObjectStorageTargetResult(options *OCIObjectStorageTargetResultOptions) *TargetResult {
|
||||
return newTargetResult(TargetNameOCIObjectStorage, options)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue