Documentation ¶
Overview ¶
Package puller implements the logic for pull operations.
Index ¶
- type Puller
- func (p *Puller) ArtifactConfig(ctx context.Context, ref, os, arch string) (*oci.ArtifactConfig, error)
- func (p *Puller) CheckAllowedType(ctx context.Context, ref, os, arch string, allowedTypes []oci.ArtifactType) error
- func (p *Puller) Descriptor(ctx context.Context, ref string) (*v1.Descriptor, error)
- func (p *Puller) Pull(ctx context.Context, ref, destDir, os, arch string) (*oci.RegistryResult, error)
- func (p *Puller) RawConfigLayer(ctx context.Context, ref, os, arch string) ([]byte, error)
- func (p *Puller) RawManifest(ctx context.Context, ref, os, arch string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Puller ¶
Puller implements pull operations.
func NewPuller ¶
NewPuller create a new puller that can be used for pull operations. The client must be ready to be used by the puller.
func (*Puller) ArtifactConfig ¶ added in v0.7.0
func (p *Puller) ArtifactConfig(ctx context.Context, ref, os, arch string) (*oci.ArtifactConfig, error)
ArtifactConfig fetches only the config layer from a given ref. If the artifact has a v1.MediaTypeImageIndex descriptor then it fetches the config layer for the specified platform.
func (*Puller) CheckAllowedType ¶ added in v0.4.0
func (p *Puller) CheckAllowedType(ctx context.Context, ref, os, arch string, allowedTypes []oci.ArtifactType) error
CheckAllowedType does a preliminary check on the manifest to state whether we are allowed or not to download this type of artifact. If allowedTypes is empty, everything is allowed, else it is used to perform the check.
func (*Puller) Descriptor ¶
Descriptor retrieves the descriptor of an artifact from a remote repository.
func (*Puller) Pull ¶
func (p *Puller) Pull(ctx context.Context, ref, destDir, os, arch string) (*oci.RegistryResult, error)
Pull an artifact from a remote registry. Ref format follows: REGISTRY/REPO[:TAG|@DIGEST]. Ex. localhost:5000/hello:latest.
func (*Puller) RawConfigLayer ¶ added in v0.7.0
RawConfigLayer fetches only the config layer from a given ref. If the artifact has a v1.MediaTypeImageIndex descriptor then it fetches the config layer for the specified platform.
func (*Puller) RawManifest ¶ added in v0.7.0
RawManifest fetches the manifest layer from a given reference. If the artifact has a v1.MediaTypeImageIndex descriptor then it fetches the manifest for the specified platform.