Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) CreateAuthenticatedOCMContext(ctx context.Context, serviceAccountName, namespace string) (ocm.Context, error)
- func (c *Client) GetComponentVersion(ctx context.Context, octx ocm.Context, url, name, version string) (ocm.ComponentVersionAccess, error)
- func (c *Client) GetProductDescription(ctx context.Context, octx ocm.Context, cv ocm.ComponentVersionAccess) ([]byte, error)
- func (c *Client) GetResourceData(ctx context.Context, cv ocm.ComponentVersionAccess, ...) ([]byte, error)
- type Contract
Constants ¶
View Source
const (
// ProductDescriptionType defines the type of the ProductDescription resource in the component version.
ProductDescriptionType = "productdescription.mpas.ocm.software"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements the OCM fetcher interface.
func (*Client) CreateAuthenticatedOCMContext ¶
func (c *Client) CreateAuthenticatedOCMContext(ctx context.Context, serviceAccountName, namespace string) (ocm.Context, error)
CreateAuthenticatedOCMContext authenticates the client using a service account.
func (*Client) GetComponentVersion ¶
func (c *Client) GetComponentVersion(ctx context.Context, octx ocm.Context, url, 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) GetProductDescription ¶
func (*Client) GetResourceData ¶
func (c *Client) GetResourceData(ctx context.Context, cv ocm.ComponentVersionAccess, ref v1alpha1.ResourceReference) ([]byte, error)
type Contract ¶
type Contract interface { CreateAuthenticatedOCMContext(ctx context.Context, serviceAccountName, namespace string) (ocm.Context, error) GetComponentVersion(ctx context.Context, octx ocm.Context, url, name, version string) (ocm.ComponentVersionAccess, error) GetProductDescription(ctx context.Context, octx ocm.Context, cv ocm.ComponentVersionAccess) ([]byte, error) GetResourceData(ctx context.Context, cv ocm.ComponentVersionAccess, ref v1alpha1.ResourceReference) ([]byte, error) }
Contract defines a subset of capabilities from the OCM library.
Click to show internal directories.
Click to hide internal directories.