versioncheck

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 16 Imported by: 5

Documentation

Index

Constants

View Source
const CLIENT_ENV = "KS_CLIENT"
View Source
const SKIP_VERSION_CHECK_DEPRECATED_ENV = "KUBESCAPE_SKIP_UPDATE_CHECK"
View Source
const SKIP_VERSION_CHECK_ENV = "KS_SKIP_UPDATE_CHECK"
View Source
const UnknownBuildNumber = "unknown"

Variables

View Source
var BuildNumber string
View Source
var Client string
View Source
var LatestReleaseVersion string

Functions

This section is empty.

Types

type IVersionCheckHandler

type IVersionCheckHandler interface {
	CheckLatestVersion(context.Context, *VersionCheckRequest) error
}

func NewIVersionCheckHandler

func NewIVersionCheckHandler(ctx context.Context) IVersionCheckHandler

type VersionCheckHandler

type VersionCheckHandler struct {
	// contains filtered or unexported fields
}

func NewVersionCheckHandler

func NewVersionCheckHandler() *VersionCheckHandler

func (*VersionCheckHandler) CheckLatestVersion

func (v *VersionCheckHandler) CheckLatestVersion(ctx context.Context, versionData *VersionCheckRequest) error

type VersionCheckHandlerMock

type VersionCheckHandlerMock struct {
}

func NewVersionCheckHandlerMock

func NewVersionCheckHandlerMock() *VersionCheckHandlerMock

func (*VersionCheckHandlerMock) CheckLatestVersion

func (v *VersionCheckHandlerMock) CheckLatestVersion(_ context.Context, _ *VersionCheckRequest) error

type VersionCheckRequest

type VersionCheckRequest struct {
	AccountID        string `json:"accountID"`        // account id
	Client           string `json:"client"`           // kubescape
	ClientBuild      string `json:"clientBuild"`      // client build environment
	ClientVersion    string `json:"clientVersion"`    // kubescape version
	ClusterID        string `json:"clusterID"`        // cluster id
	Framework        string `json:"framework"`        // framework name
	FrameworkVersion string `json:"frameworkVersion"` // framework version
	HelmChartVersion string `json:"helmChartVersion"` // helm chart version
	Nodes            int    `json:"nodes"`            // number of nodes
	ScanningTarget   string `json:"target"`           // Deprecated
	ScanningContext  string `json:"context"`          // scanning context- cluster/file/gitURL/localGit/dir
	TriggeredBy      string `json:"triggeredBy"`      // triggered by - cli/ ci / microservice
}

func NewVersionCheckRequest

func NewVersionCheckRequest(accountID, buildNumber, frameworkName, frameworkVersion, scanningContext string, k8sClient kubernetes.Interface) *VersionCheckRequest

type VersionCheckResponse

type VersionCheckResponse struct {
	Client          string `json:"client"`          // kubescape
	ClientUpdate    string `json:"clientUpdate"`    // kubescape latest version
	Framework       string `json:"framework"`       // framework name
	FrameworkUpdate string `json:"frameworkUpdate"` // framework latest version
	Message         string `json:"message"`         // alert message
}

Jump to

Keyboard shortcuts

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