descriptions

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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) 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:   15 * time.Second,
	}
)

type HTTPDescription

type HTTPDescription interface {
	CheckConnection() error
	RequestDescriptions(descriptionIDs []string) (map[string]descModel.CISDescriptions, 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