Documentation ¶
Index ¶
- 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(ctx context.Context, octx ocm.Context, obj *v1alpha1.ComponentVersion, ...) (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, error)
- func (c *Client) ListComponentVersions(logger logr.Logger, octx ocm.Context, obj *v1alpha1.ComponentVersion) ([]Version, 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 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(ctx context.Context, octx ocm.Context, obj *v1alpha1.ComponentVersion, 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, error)
GetResource returns a reader for the resource data. It is the responsibility of the caller to close the reader.
func (*Client) ListComponentVersions ¶
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, error) GetComponentVersion(ctx context.Context, octx ocm.Context, obj *v1alpha1.ComponentVersion, 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) }
Contract defines a subset of capabilities from the OCM library.
Click to show internal directories.
Click to hide internal directories.