api

package
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2021 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package api provides client to make rest api call to RH catalog and container published image database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContainer404Error

func GetContainer404Error() error

GetContainer404Error return error object with 404 error string

Types

type CertAPIClient

type CertAPIClient struct {
	Client HTTPClient
}

CertAPIClient is http client to handle `pyxis` rest api

func NewHTTPClient

func NewHTTPClient() CertAPIClient

NewHTTPClient return new http client

func (CertAPIClient) Find

func (api CertAPIClient) Find(obj interface{}, key string) (interface{}, bool)

Find key in interface (recursively) and return value as interface

func (CertAPIClient) GetImageByID

func (api CertAPIClient) GetImageByID(id string) (response string, err error)

GetImageByID get container image data for the given container Id

func (CertAPIClient) GetImageIDByRepository

func (api CertAPIClient) GetImageIDByRepository(repository, imageName string) (imageID string, err error)

GetImageIDByRepository get container image data for the given container Id

func (CertAPIClient) GetOperatorBundleIDByPackageName

func (api CertAPIClient) GetOperatorBundleIDByPackageName(org, name string) (imageID string, err error)

GetOperatorBundleIDByPackageName get published operator bundle Id by organization and package name

func (CertAPIClient) IsContainerCertified

func (api CertAPIClient) IsContainerCertified(repository, imageName string) bool

IsContainerCertified get container image info by repo/name and checks if container details is present If present then returns `true` as certified operators.

func (CertAPIClient) IsOperatorCertified

func (api CertAPIClient) IsOperatorCertified(org, packageName string) bool

IsOperatorCertified get operator bundle by package name and check if package details is present If present then returns `true` as certified operators.

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient Client interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL