Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultRPMLayerOptions(rpmName, arch string) []oras.LayerOption
- func GetRepomdDataLayerType(dataType string) string
- func NewRPMPusher(path, repo string, opts ...name.Option) (oras.Pusher, error)
- func NewRPMStreamPusher(stream io.Reader, repo string, opts ...name.Option) (oras.Pusher, string, error)
- func RPMReferenceLayer(r io.Reader, repo string, opts ...name.Option) (name.Reference, []oras.LayerOption, error)
- type GenericRPMMetadata
- type RPMMetadata
- type RPMMetadataLayer
- func (l *RPMMetadataLayer) Annotations() map[string]string
- func (l *RPMMetadataLayer) Compressed() (io.ReadCloser, error)
- func (l *RPMMetadataLayer) DiffID() (v1.Hash, error)
- func (l *RPMMetadataLayer) Digest() (v1.Hash, error)
- func (l *RPMMetadataLayer) MediaType() (types.MediaType, error)
- func (l *RPMMetadataLayer) Platform() *v1.Platform
- func (l *RPMMetadataLayer) Size() (int64, error)
- func (l *RPMMetadataLayer) Uncompressed() (io.ReadCloser, error)
- type RPMMetadataPusher
- type RPMPuller
Constants ¶
const ( RPMConfigType = "application/vnd.ciq.rpm.package.v1.config+json" RPMPackageLayerType = "application/vnd.ciq.rpm.package.v1.rpm" )
const ( RepomdConfigType = "application/vnd.ciq.rpm.repomd.v1.config+json" RepomdXMLLayerType = "application/vnd.ciq.rpm.repomd.v1.xml" RepomdXMLSignatureLayerType = "application/vnd.ciq.rpm.repomd.v1.xml.asc" RepomdDataConfigType = "application/vnd.ciq.rpm.repomd.extra.v1.config+xml" RepomdDataLayerTypeFormat = "application/vnd.ciq.rpm.repomd.extra.v1.%s" )
Variables ¶
var ErrNoRPMConfig = errors.New("RPM config not found")
Functions ¶
func DefaultRPMLayerOptions ¶ added in v0.0.3
func DefaultRPMLayerOptions(rpmName, arch string) []oras.LayerOption
DefaultRPMLayerOptions returns the default layer options for a RPM package.
func GetRepomdDataLayerType ¶ added in v0.0.3
func NewRPMPusher ¶
NewRPMPuller returns a pusher instance to push a local RPM package.
Types ¶
type GenericRPMMetadata ¶ added in v0.0.3
type GenericRPMMetadata struct {
// contains filtered or unexported fields
}
GenericRPMMetadata defines a generic RPM repository metadata.
func NewGenericRPMMetadata ¶ added in v0.0.3
func NewGenericRPMMetadata(path string, mediatype string, annotations map[string]string) (*GenericRPMMetadata, error)
NewGenericRPMMetadata returns a generic RPM repository metadata.
func (*GenericRPMMetadata) Annotations ¶ added in v0.0.3
func (g *GenericRPMMetadata) Annotations() map[string]string
Annotations returns optional annotations associated with the metadata file.
func (*GenericRPMMetadata) Digest ¶ added in v0.0.3
func (g *GenericRPMMetadata) Digest() (string, string)
Digest returns the metadata file digest.
func (*GenericRPMMetadata) Mediatype ¶ added in v0.0.3
func (g *GenericRPMMetadata) Mediatype() string
Mediatype returns the mediatype for this metadata.
func (*GenericRPMMetadata) Path ¶ added in v0.0.3
func (g *GenericRPMMetadata) Path() string
Path returns the metadata file path.
func (*GenericRPMMetadata) Size ¶ added in v0.0.3
func (g *GenericRPMMetadata) Size() int64
Size returns the metadata file size.
type RPMMetadata ¶
type RPMMetadataLayer ¶
type RPMMetadataLayer struct {
// contains filtered or unexported fields
}
RPMMetadataLayer defines an OCI layer descriptor associated to RPM repository metadatas.
func NewRPMMetadataLayer ¶
func NewRPMMetadataLayer(repomd RPMMetadata) *RPMMetadataLayer
NewRPMMetadataLayer returns an OCI layer descriptor for the corresponding RPM metadata.
func (*RPMMetadataLayer) Annotations ¶
func (l *RPMMetadataLayer) Annotations() map[string]string
Annotations returns annotations associated to this layer.
func (*RPMMetadataLayer) Compressed ¶
func (l *RPMMetadataLayer) Compressed() (io.ReadCloser, error)
Compressed returns an io.ReadCloser for the RPM file content.
func (*RPMMetadataLayer) DiffID ¶
func (l *RPMMetadataLayer) DiffID() (v1.Hash, error)
DiffID returns the Hash of the uncompressed layer (not supported by ORAS).
func (*RPMMetadataLayer) Digest ¶
func (l *RPMMetadataLayer) Digest() (v1.Hash, error)
Digest returns the Hash of the RPM package.
func (*RPMMetadataLayer) MediaType ¶
func (l *RPMMetadataLayer) MediaType() (types.MediaType, error)
MediaType returns the media type of the Layer.
func (*RPMMetadataLayer) Platform ¶
func (l *RPMMetadataLayer) Platform() *v1.Platform
Platform returns platform information for this layer.
func (*RPMMetadataLayer) Size ¶
func (l *RPMMetadataLayer) Size() (int64, error)
Size returns the size of the RPM file.
func (*RPMMetadataLayer) Uncompressed ¶
func (l *RPMMetadataLayer) Uncompressed() (io.ReadCloser, error)
Uncompressed returns an io.ReadCloser for the uncompressed layer contents (not supported by ORAS).
type RPMMetadataPusher ¶
type RPMMetadataPusher struct {
// contains filtered or unexported fields
}
RPMMetadataPusher type to push RPM metadata to registry.
func NewRPMExtraMetadataPusher ¶ added in v0.0.3
func NewRPMExtraMetadataPusher(path, repo, dataType string, opts ...name.Option) (*RPMMetadataPusher, error)
func NewRPMMetadataPusher ¶
func (*RPMMetadataPusher) ImageIndex ¶
func (rp *RPMMetadataPusher) ImageIndex() (v1.ImageIndex, error)
func (*RPMMetadataPusher) Reference ¶
func (rp *RPMMetadataPusher) Reference() name.Reference
type RPMPuller ¶
type RPMPuller struct {
// contains filtered or unexported fields
}
RPMPuller type to pull RPM package from registry.
func NewRPMPuller ¶
NewRPMPuller returns a puller instance to pull RPM package from the reference and write image content to the writer.
func (*RPMPuller) Config ¶
func (rp *RPMPuller) Config(config v1.Descriptor) error
Config validates the config mediatype.
func (*RPMPuller) IndexManifest ¶
func (rp *RPMPuller) IndexManifest(index *v1.IndexManifest) *v1.Hash
IndexManifest returns the manifest digest corresponding to the current architecture.