Documentation ¶
Index ¶
- type Client
- func (c *Client) CreateAuthenticatedOCMContext(ctx context.Context, obj *v1alpha1.ComponentSubscription) (ocm.Context, error)
- func (c *Client) GetComponentVersion(ctx context.Context, octx ocm.Context, obj *v1alpha1.ComponentSubscription, ...) (ocm.ComponentVersionAccess, error)
- func (c *Client) GetLatestSourceComponentVersion(ctx context.Context, octx ocm.Context, obj *v1alpha1.ComponentSubscription) (string, error)
- func (c *Client) SignDestinationComponent(_ context.Context, component ocm.ComponentVersionAccess) ([]byte, error)
- func (c *Client) TransferComponent(ctx context.Context, octx ocm.Context, obj *v1alpha1.ComponentSubscription, ...) error
- func (c *Client) VerifyComponent(ctx context.Context, obj *v1alpha1.ComponentSubscription, ...) (bool, error)
- type Contract
- type Version
Constants ¶
This section is empty.
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 ¶ added in v0.2.0
func (*Client) GetComponentVersion ¶
func (c *Client) GetComponentVersion( ctx context.Context, octx ocm.Context, obj *v1alpha1.ComponentSubscription, 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) GetLatestSourceComponentVersion ¶
func (*Client) SignDestinationComponent ¶ added in v0.11.0
func (c *Client) SignDestinationComponent(_ context.Context, component ocm.ComponentVersionAccess) ([]byte, error)
SignDestinationComponent signs the component before transferring it and returns the public key for storing it on the subscription.
func (*Client) TransferComponent ¶
func (c *Client) TransferComponent( ctx context.Context, octx ocm.Context, obj *v1alpha1.ComponentSubscription, sourceComponentVersion ocm.ComponentVersionAccess, ) error
func (*Client) VerifyComponent ¶ added in v0.11.0
func (c *Client) VerifyComponent(ctx context.Context, obj *v1alpha1.ComponentSubscription, cv ocm.ComponentVersionAccess) (bool, error)
type Contract ¶ added in v0.2.0
type Contract interface { CreateAuthenticatedOCMContext(ctx context.Context, obj *v1alpha1.ComponentSubscription) (ocm.Context, error) VerifyComponent(ctx context.Context, obj *v1alpha1.ComponentSubscription, cv ocm.ComponentVersionAccess) (bool, error) SignDestinationComponent(ctx context.Context, component ocm.ComponentVersionAccess) ([]byte, error) GetComponentVersion( ctx context.Context, octx ocm.Context, obj *v1alpha1.ComponentSubscription, version string, ) (ocm.ComponentVersionAccess, error) GetLatestSourceComponentVersion(ctx context.Context, octx ocm.Context, obj *v1alpha1.ComponentSubscription) (string, error) TransferComponent( ctx context.Context, octx ocm.Context, obj *v1alpha1.ComponentSubscription, sourceComponentVersion ocm.ComponentVersionAccess, ) error }
Contract defines a subset of capabilities from the OCM library.
Click to show internal directories.
Click to hide internal directories.