onlinecheck

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: GPL-2.0 Imports: 11 Imported by: 1

Documentation

Overview

Copyright (C) 2020-2023 Red Hat, Inc.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

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 HTTPClient

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

HTTPClient Client interface

type OnlineValidator

type OnlineValidator struct {
	Client HTTPClient
}

CertAPIClient is http client to handle `pyxis` rest api

func NewOnlineValidator

func NewOnlineValidator() OnlineValidator

NewOnlineValidator return an online implementation of the CertificationValidator interface

func (OnlineValidator) Find

func (validator OnlineValidator) Find(obj interface{}, key string) (interface{}, bool)

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

func (OnlineValidator) GetCertifiedCharts

func (validator OnlineValidator) GetCertifiedCharts() (offlinecheck.ChartStruct, error)

func (OnlineValidator) GetRequest

func (validator OnlineValidator) GetRequest(url string) (response []byte, err error)

getRequest a http call to rest api, returns byte array or error

func (OnlineValidator) IsContainerCertified

func (validator OnlineValidator) IsContainerCertified(registry, repository, tag, digest string) bool

IsContainerCertified get container image info by registry/repository [tag|digest] returns true if the container is present and is certified. returns false otherwise

func (OnlineValidator) IsHelmChartCertified

func (validator OnlineValidator) IsHelmChartCertified(helm *release.Release, ourKubeVersion string) bool

func (OnlineValidator) IsOperatorCertified

func (validator OnlineValidator) IsOperatorCertified(csvName, ocpVersion string) bool

IsOperatorCertified get operator bundle by csv name from the certified-operators org If present then returns `true` if channel and ocp version match.

func (OnlineValidator) IsServiceReachable

func (validator OnlineValidator) IsServiceReachable() bool

IsServiceReachable check if redhat catalog is reachable and its database is available to query

Jump to

Keyboard shortcuts

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