Documentation ¶
Index ¶
- func ParseOCIReference(ociRef string) (reference.Named, error)
- type ErrNoContentDigest
- type Registry
- func (r *Registry) PullBundle(tag string, insecureRegistry bool) (bundle.Bundle, *relocation.ImageRelocationMap, error)
- func (r *Registry) PushBundle(bun bundle.Bundle, tag string, insecureRegistry bool) (*relocation.ImageRelocationMap, error)
- func (r *Registry) PushInvocationImage(invocationImage string) (string, error)
- type RegistryProvider
- type TestRegistry
- func (t TestRegistry) PullBundle(tag string, insecureRegistry bool) (bundle.Bundle, *relocation.ImageRelocationMap, error)
- func (t TestRegistry) PushBundle(bun bundle.Bundle, tag string, insecureRegistry bool) (*relocation.ImageRelocationMap, error)
- func (t TestRegistry) PushInvocationImage(invocationImage string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) PullBundle ¶
func (r *Registry) PullBundle(tag string, insecureRegistry bool) (bundle.Bundle, *relocation.ImageRelocationMap, 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(bun bundle.Bundle, tag string, insecureRegistry bool) (*relocation.ImageRelocationMap, 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(tag string, insecureRegistry bool) (bundle.Bundle, *relocation.ImageRelocationMap, error) // PushBundle pushes a bundle to an OCI registry. PushBundle(bun bundle.Bundle, tag string, insecureRegistry bool) (*relocation.ImageRelocationMap, 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) (string, error) }
Registry handles talking with an OCI registry.
type TestRegistry ¶
type TestRegistry struct { MockPullBundle func(tag string, insecureRegistry bool) (bun bundle.Bundle, reloMap *relocation.ImageRelocationMap, err error) MockPushBundle func(bun bundle.Bundle, tag string, insecureRegistry bool) (reloMap *relocation.ImageRelocationMap, err error) MockPushInvocationImage func(invocationImage string) (imageDigest string, err error) }
func NewTestRegistry ¶
func NewTestRegistry() *TestRegistry
func (TestRegistry) PullBundle ¶
func (t TestRegistry) PullBundle(tag string, insecureRegistry bool) (bundle.Bundle, *relocation.ImageRelocationMap, error)
func (TestRegistry) PushBundle ¶
func (t TestRegistry) PushBundle(bun bundle.Bundle, tag string, insecureRegistry bool) (*relocation.ImageRelocationMap, error)
func (TestRegistry) PushInvocationImage ¶
func (t TestRegistry) PushInvocationImage(invocationImage string) (string, error)
Click to show internal directories.
Click to hide internal directories.