descriptions

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckVersion added in v1.4.6

func CheckVersion(t *tracker.CITracker)

CheckVersion - checks if using the latest version and saves that information in the tracker

func RequestAndOverrideDescriptions

func RequestAndOverrideDescriptions(summary *model.Summary) error

RequestAndOverrideDescriptions - Requests CIS descriptions and override default descriptions

Types

type Client

type Client struct {
}

Client - client for making CIS descriptions requests

func (*Client) CheckConnection

func (c *Client) CheckConnection() error

CheckConnection - checks if the endpoint is reachable

func (*Client) CheckLatestVersion added in v1.4.6

func (c *Client) CheckLatestVersion(version string) (model.Version, error)

CheckLatestVersion - Check if using KICS latest version from endpoint

func (*Client) RequestDescriptions

func (c *Client) RequestDescriptions(descriptionIDs []string) (map[string]descModel.CISDescriptions, error)

RequestDescriptions - gets CIS descriptions from endpoint

type HTTPClient

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

HTTPClient - http client to use for requests

var (

	// HTTPRequestClient - http client to use for requests
	HTTPRequestClient HTTPClient = &http.Client{
		Transport: tr,
		Timeout:   20 * time.Second,
	}
)

type HTTPDescription

type HTTPDescription interface {
	CheckConnection() error
	RequestDescriptions(descriptionIDs []string) (map[string]descModel.CISDescriptions, error)
	CheckLatestVersion(version string) (model.Version, error)
}

HTTPDescription - HTTP client interface to use for requesting descriptions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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