Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrArtifactNotFound indicates that the requested artifact was not found // in the registry. ErrArtifactNotFound = errors.New("artifact not found") // ErrLayerNotFound indicates that the requested layer was not found in the // OCI artifact provided. ErrLayerNotFound = errors.New("layer not found") // Cosign represents the cosign signature kind. Cosign = "cosign" )
Functions ¶
Types ¶
type Puller ¶
type Puller struct {
// contains filtered or unexported fields
}
Puller is a hub.OCIPuller implementation.
type PullerMock ¶
PullerMock is a mock hub.OCIPuller implementation.
func (*PullerMock) PullLayer ¶
func (m *PullerMock) PullLayer( ctx context.Context, ref, mediaType, username, password string, ) (ocispec.Descriptor, []byte, error)
PullLayer implements the hub.OCIPuller interface.
type SignatureChecker ¶
type SignatureChecker struct {
// contains filtered or unexported fields
}
SignatureChecker is a hub.OCISignatureChecker implementation.
func NewSignatureChecker ¶
func NewSignatureChecker(cfg *viper.Viper, op hub.OCIPuller) *SignatureChecker
NewSignatureChecker creates a new Puller instance.
func (*SignatureChecker) HasCosignSignature ¶
func (c *SignatureChecker) HasCosignSignature( ctx context.Context, ref, username, password string, ) (bool, error)
HasCosignSignature checks if the OCI artifact identified by the reference provided has a cosign (sigstore) signature.
type SignatureCheckerMock ¶
SignatureCheckerMock is a mock implementation of the hub.OCISignatureChecker interface.
func (*SignatureCheckerMock) HasCosignSignature ¶
func (m *SignatureCheckerMock) HasCosignSignature( ctx context.Context, ref, username, password string, ) (bool, error)
HasCosignSignature implements the OCITagsGetter interface.
type TagsGetter ¶
type TagsGetter struct {
// contains filtered or unexported fields
}
TagsGetter provides a mechanism to get all the version tags available for a given repository in a OCI registry. Tags that aren't valid semver versions will be filtered out.
func NewTagsGetter ¶
func NewTagsGetter(cfg *viper.Viper) *TagsGetter
TagsGetter creates a new TagsGetter instance.
func (*TagsGetter) Tags ¶
func (tg *TagsGetter) Tags(ctx context.Context, r *hub.Repository, onlySemver bool) ([]string, error)
Tags returns a list with the tags available for the provided repository.
type TagsGetterMock ¶
TagsGetterMock is a mock implementation of the hub.OCITagsGetter interface.
func (*TagsGetterMock) Tags ¶
func (m *TagsGetterMock) Tags(ctx context.Context, r *hub.Repository, onlySemver bool) ([]string, error)
Tags implements the OCITagsGetter interface.