server

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ServerCommandTimeout is the default time for server command
	ServerCommandTimeout int = 10

	// ServerCommand is terrascan's server command
	ServerCommand string = "server"
)

Variables

This section is empty.

Functions

func CompareResponseAndGoldenOutput

func CompareResponseAndGoldenOutput(goldenFilePath string, responseBytes []byte)

CompareResponseAndGoldenOutput compares the json response and golden json output

func MakeFileScanRequest

func MakeFileScanRequest(iacFilePath, URL string, bodyAttributes map[string]string, expectedStatusCode int) []byte

MakeFileScanRequest calls the file scan handler of api server

func MakeHTTPRequest

func MakeHTTPRequest(method, URL string) (*http.Response, error)

MakeHTTPRequest calls health handler of the api server

func MakeRemoteScanRequest

func MakeRemoteScanRequest(URL string, bodyAttributes map[string]interface{}, expectedStatusCode int) []byte

MakeRemoteScanRequest calls the file scan handler of api server

func ValidateExitCodeAndOutput

func ValidateExitCodeAndOutput(session *gexec.Session, exitCode int, relFilePath string, isStdOut bool)

ValidateExitCodeAndOutput validates the exit code and output of the command

Types

This section is empty.

Jump to

Keyboard shortcuts

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