Documentation ¶
Index ¶
- type ErrNoContentDigest
- type Registry
- func (r *Registry) IsImageCached(invocationImage string) (bool, error)
- func (r *Registry) PullBundle(ref cnab.OCIReference, insecureRegistry bool) (cnab.BundleReference, error)
- func (r *Registry) PushBundle(bundleRef cnab.BundleReference, insecureRegistry bool) (cnab.BundleReference, error)
- func (r *Registry) PushInvocationImage(invocationImage string) (digest.Digest, error)
- type RegistryProvider
- type TestRegistry
- func (t TestRegistry) IsImageCached(invocationImage string) (bool, error)
- func (t TestRegistry) PullBundle(ref cnab.OCIReference, insecureRegistry bool) (cnab.BundleReference, error)
- func (t TestRegistry) PushBundle(bundleRef cnab.BundleReference, insecureRegistry bool) (cnab.BundleReference, error)
- func (t TestRegistry) PushInvocationImage(invocationImage string) (digest.Digest, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrNoContentDigest ¶ added in v0.30.0
type ErrNoContentDigest error
ErrNoContentDigest represents an error due to an image not having a corresponding content digest in a bundle definition
func NewErrNoContentDigest ¶ added in v0.30.0
func NewErrNoContentDigest(image string) ErrNoContentDigest
NewErrNoContentDigest returns an ErrNoContentDigest formatted with the provided image name
type Registry ¶
type Registry struct {
*portercontext.Context
}
func NewRegistry ¶
func NewRegistry(c *portercontext.Context) *Registry
func (*Registry) IsImageCached ¶
func (*Registry) PullBundle ¶
func (r *Registry) PullBundle(ref cnab.OCIReference, insecureRegistry bool) (cnab.BundleReference, error)
PullBundle pulls a bundle from an OCI registry. Returns the bundle, and an optional image relocation mapping, if applicable.
func (*Registry) PushBundle ¶
func (r *Registry) PushBundle(bundleRef cnab.BundleReference, insecureRegistry bool) (cnab.BundleReference, error)
func (*Registry) PushInvocationImage ¶
PushInvocationImage pushes the invocation image from the Docker image cache to the specified location the expected format of the invocationImage is REGISTRY/NAME:TAG. Returns the image digest from the registry.
type RegistryProvider ¶
type RegistryProvider interface { // PullBundle pulls a bundle from an OCI registry. PullBundle(ref cnab.OCIReference, insecureRegistry bool) (cnab.BundleReference, error) // PushBundle pushes a bundle to an OCI registry. PushBundle(bundleRef cnab.BundleReference, insecureRegistry bool) (cnab.BundleReference, error) // PushInvocationImage pushes the invocation image from the Docker image cache to the specified location // the expected format of the invocationImage is REGISTRY/NAME:TAG. // Returns the image digest from the registry. PushInvocationImage(invocationImage string) (digest.Digest, error) // IsImageCached checks whether a particular invocation image exists in the local image cache. IsImageCached(invocationImage string) (bool, error) }
Registry handles talking with an OCI registry.
type TestRegistry ¶
type TestRegistry struct { MockPullBundle func(ref cnab.OCIReference, insecureRegistry bool) (cnab.BundleReference, error) MockPushBundle func(bundleRef cnab.BundleReference, insecureRegistry bool) (bundleReference cnab.BundleReference, err error) MockPushInvocationImage func(invocationImage string) (imageDigest digest.Digest, err error) MockIsImageCached func(invocationImage string) (bool, error) }
func NewTestRegistry ¶
func NewTestRegistry() *TestRegistry
func (TestRegistry) IsImageCached ¶
func (t TestRegistry) IsImageCached(invocationImage string) (bool, error)
func (TestRegistry) PullBundle ¶
func (t TestRegistry) PullBundle(ref cnab.OCIReference, insecureRegistry bool) (cnab.BundleReference, error)
func (TestRegistry) PushBundle ¶
func (t TestRegistry) PushBundle(bundleRef cnab.BundleReference, insecureRegistry bool) (cnab.BundleReference, error)
func (TestRegistry) PushInvocationImage ¶
func (t TestRegistry) PushInvocationImage(invocationImage string) (digest.Digest, error)
Click to show internal directories.
Click to hide internal directories.