Documentation
¶
Index ¶
- func GetOCMComponent(ctx context.Context, client client.Client, componentName string, ...) (v1beta1.ComponentVersion, error)
- func GetOCMComponentsWithVersions(ctx context.Context, repo ocm.Repository, components []string, ...) ([]v1beta1.Component, error)
- func GetOCMLocalRepo(ocmRegistry []byte, prefixFilter string) (ocm.Repository, []string, error)
- func GetOCMRemoteRepo(ocmRegistry string, secret corev1.Secret, prefixFilter string) (ocm.Repository, []string, error)
- func GetRepositoriesInOCIRegistry(ociRegistry string, creds RegistryCredentials, prefixFilter string, ...) ([]string, error)
- type CatalogResponse
- type RegistryCredentials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOCMComponent ¶
func GetOCMComponent( ctx context.Context, client client.Client, componentName string, version string, ) (v1beta1.ComponentVersion, error)
GetOCMComponent takes a component name and a version as input and searches in an OCM registry if the component with version is available. The function returns a Component object with the repository and version of the component.
func GetOCMComponentsWithVersions ¶
func GetOCMComponentsWithVersions(ctx context.Context, repo ocm.Repository, components []string, prefixFilter string) ([]v1beta1.Component, error)
This method takes a ocm repository and a list of components to create our Component struct out of it In that process, the ocm Repository will be searched for the specificed component names and their available versions will be put into the resulting component array.
The prefixFilter must be specified as it will be cut off every componentName in the end so the resulting Component names are without it.
func GetOCMLocalRepo ¶
Create an ocm.Repository entity out a byte array of a tar based ocm registry.
Additionally the method returns a list of components in the second return parameter which are part of the ocm Repository. This can be filtered using the prefixFilter parameter.
func GetOCMRemoteRepo ¶
func GetOCMRemoteRepo(ocmRegistry string, secret corev1.Secret, prefixFilter string) (ocm.Repository, []string, error)
Create an ocm.Repository entity out of an url specified in the ocmRegistry parameter. With the secret parameter you provide the necessary username and password for accessing the ocm Repository.
Additionally the method returns a list of components in the second return parameter which are part of the ocm Repository. This can be filtered using the prefixFilter parameter.
func GetRepositoriesInOCIRegistry ¶
func GetRepositoriesInOCIRegistry(ociRegistry string, creds RegistryCredentials, prefixFilter string, protocol string) ([]string, error)
* @Description: GetRepositoriesInOCIRegistry returns the repositories in the OCI registry * @param ociRegistry string - the OCI registry URL without paths * @param creds RegistryCredentials - the credentials to access the OCI registry * @param prefixFilter string - the prefix to filter the repositories * @param protocol string - the protocol to use to access the OCI registry, http or https * @return []string - the list of repositories in the OCI registry
Types ¶
type CatalogResponse ¶
type CatalogResponse struct {
Repositories []string `json:"repositories"`
}