Documentation ¶
Index ¶
- func ConfigureCredentials(ctx context.Context, ocmCtx ocm.Context, c client.Client, ...) error
- func ConstructRepositoryName(identity ocmmetav1.Identity) (string, error)
- func HashIdentity(id ocmmetav1.Identity) (string, error)
- type Client
- func (c *Client) CreateAuthenticatedOCMContext(ctx context.Context, obj *v1alpha1.ComponentVersion) (ocm.Context, error)
- func (c *Client) GetComponentVersion(_ context.Context, octx ocm.Context, repositoryURL, name, version string) (ocm.ComponentVersionAccess, error)
- func (c *Client) GetLatestValidComponentVersion(ctx context.Context, octx ocm.Context, obj *v1alpha1.ComponentVersion) (string, error)
- func (c *Client) GetResource(ctx context.Context, octx ocm.Context, cv *v1alpha1.ComponentVersion, ...) (io.ReadCloser, string, int64, error)
- func (c *Client) ListComponentVersions(logger logr.Logger, octx ocm.Context, obj *v1alpha1.ComponentVersion) ([]Version, error)
- func (c *Client) TransferComponent(octx ocm.Context, obj *v1alpha1.ComponentVersion, ...) error
- func (c *Client) VerifyComponent(ctx context.Context, octx ocm.Context, obj *v1alpha1.ComponentVersion, ...) (bool, error)
- type Contract
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureCredentials ¶
func ConfigureCredentials(ctx context.Context, ocmCtx ocm.Context, c client.Client, repositoryURL, secretRef, namespace string) error
ConfigureCredentials takes a repository url and secret ref and configures access to an OCI repository.
func ConstructRepositoryName ¶
ConstructRepositoryName hashes the name and passes it back.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements the OCM fetcher interface.
func (*Client) CreateAuthenticatedOCMContext ¶
func (*Client) GetComponentVersion ¶
func (c *Client) GetComponentVersion( _ context.Context, octx ocm.Context, repositoryURL, name, version string, ) (ocm.ComponentVersionAccess, error)
GetComponentVersion returns a component Version. It's the caller's responsibility to clean it up and close the component Version once done with it.
func (*Client) GetLatestValidComponentVersion ¶
func (c *Client) GetLatestValidComponentVersion( ctx context.Context, octx ocm.Context, obj *v1alpha1.ComponentVersion, ) (string, error)
GetLatestValidComponentVersion gets the latest version that still matches the constraint.
func (*Client) GetResource ¶
func (c *Client) GetResource( ctx context.Context, octx ocm.Context, cv *v1alpha1.ComponentVersion, resource *v1alpha1.ResourceReference, ) (io.ReadCloser, string, int64, error)
GetResource returns a reader for the resource data. It is the responsibility of the caller to close the reader.
func (*Client) ListComponentVersions ¶
func (*Client) TransferComponent ¶ added in v0.24.0
func (c *Client) TransferComponent( octx ocm.Context, obj *v1alpha1.ComponentVersion, sourceComponentVersion ocm.ComponentVersionAccess, ) error
type Contract ¶
type Contract interface { CreateAuthenticatedOCMContext(ctx context.Context, obj *v1alpha1.ComponentVersion) (ocm.Context, error) GetResource( ctx context.Context, octx ocm.Context, cv *v1alpha1.ComponentVersion, resource *v1alpha1.ResourceReference, ) (io.ReadCloser, string, int64, error) GetComponentVersion( ctx context.Context, octx ocm.Context, repositoryURL, name, version string, ) (ocm.ComponentVersionAccess, error) GetLatestValidComponentVersion(ctx context.Context, octx ocm.Context, obj *v1alpha1.ComponentVersion) (string, error) ListComponentVersions(logger logr.Logger, octx ocm.Context, obj *v1alpha1.ComponentVersion) ([]Version, error) VerifyComponent(ctx context.Context, octx ocm.Context, obj *v1alpha1.ComponentVersion, version string) (bool, error) TransferComponent( octx ocm.Context, obj *v1alpha1.ComponentVersion, sourceComponentVersion ocm.ComponentVersionAccess, ) error }
Contract defines a subset of capabilities from the OCM library.
Click to show internal directories.
Click to hide internal directories.