backend

package
v0.0.0-...-77fb227 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalyzeDependencyTree

func AnalyzeDependencyTree(
	backendHost, ecosystem, cliClient, contentType string,
	content []byte,
	tokens map[HeaderTokenKeyType]string,
	jsonOut bool,
) (*http.Response, error)

AnalyzeDependencyTree is used to create the stack report against the backend will return the response body or an error

func ParseHtmlResponse

func ParseHtmlResponse(reader io.ReadCloser, ecosystem string) (string, error)

ParseHtmlResponse is used to deserialized backend text/html type response It will save the unmarshalled content as a html file in os temp folder and return its uri or an error

func ParseJsonResponse

func ParseJsonResponse(reader io.ReadCloser) (*api.AnalysisReport, error)

ParseJsonResponse is used to deserialize the backend application/json type response It will return the unmarshalled response or an error

Types

type HeaderTokenKeyType

type HeaderTokenKeyType string
const (
	HeaderTokenSnyk HeaderTokenKeyType = "crda_snyk_token"
)

Directories

Path Synopsis
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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