http

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DatadogHeaderAPIKey = "dd-api-key" // #nosec G101
View Source
const DatadogHeaderAppKey = "dd-application-key"
View Source
const DatadogHeaderJwtToken = "dd-auth-jwt" // #nosec G101
View Source
const DatadogHostnameDefault = "api.datadoghq.com"
View Source
const HeaderContentType = "Content-Type"
View Source
const HeaderContentTypeApplicationJSON = "application/json"

Variables

This section is empty.

Functions

func HasDatadogAuth added in v1.10.0

func HasDatadogAuth(ddJwtToken string) bool

HasDatadogAuth returns true when Datadog API authentication is configured.

func PostGetMergedConfig added in v1.10.0

func PostGetMergedConfig(repositoryURL string, localConfigContents *string, ddBaseURL string, ddJwtToken string) (string, error)

PostGetMergedConfig calls the merged-config endpoint with a repository URL and optional local config contents, then returns the decoded merged config YAML.

Types

type DatadogEnvVar

type DatadogEnvVar string
const (
	DatadogEnvVarSite     DatadogEnvVar = "SITE"
	DatadogEnvVarAPIKey   DatadogEnvVar = "API_KEY"
	DatadogEnvVarAppKey   DatadogEnvVar = "APP_KEY"
	DatadogEnvVarHostname DatadogEnvVar = "HOSTNAME"
	DatadogEnvVarJwtToken DatadogEnvVar = "JWT_TOKEN"
)

type GetMergedConfigRequest added in v1.10.0

type GetMergedConfigRequest struct {
	ID           string  `json:"id"            jsonapi:"primary,config"`
	Repository   string  `json:"repository"    jsonapi:"attribute"`
	ConfigBase64 *string `json:"config_base64" jsonapi:"attribute"`
}

type GetMergedConfigResponse added in v1.10.0

type GetMergedConfigResponse struct {
	ID           string `json:"id"            jsonapi:"primary,config"`
	ConfigBase64 string `json:"config_base64" jsonapi:"attribute"`
}
type Header struct {
	Key   string
	Value string
}

type ResolveVulnerableSymbolsRequest

type ResolveVulnerableSymbolsRequest struct {
	ID    string   `json:"id"    jsonapi:"primary,resolve-vulnerable-symbols-request"`
	Purls []string `json:"purls" jsonapi:"attribute"`
}

type ResolveVulnerableSymbolsResponse

type ResolveVulnerableSymbolsResponse struct {
	ID      string           `json:"id"      jsonapi:"primary,resolve-vulnerable-symbols-response"`
	Results []SymbolsForPurl `json:"results" jsonapi:"attribute"`
}

func PostResolveVulnerableSymbols

func PostResolveVulnerableSymbols(purls []string, ddBaseURL string, ddJwtToken string) (ResolveVulnerableSymbolsResponse, error)

type Symbol

type Symbol struct {
	Type  string `json:"type"  jsonapi:"attribute"`
	Value string `json:"value" jsonapi:"attribute"`
	Name  string `json:"name"  jsonapi:"attribute"`
}

type SymbolDetails

type SymbolDetails struct {
	AdvisoryID string   `json:"advisory_id" jsonapi:"attribute"`
	Symbols    []Symbol `json:"symbols"     jsonapi:"attribute"`
}

type SymbolsForPurl

type SymbolsForPurl struct {
	Purl              string          `json:"purl"               jsonapi:"attribute"`
	VulnerableSymbols []SymbolDetails `json:"vulnerable_symbols" jsonapi:"attribute"`
}

Jump to

Keyboard shortcuts

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