descriptions

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

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