vulnmap_api

package
v0.0.0-...-dfd24c6 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	SastEnabledOperation = "sastEnabled"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeApiClient

type FakeApiClient struct {
	Calls           map[string][][]any
	CodeEnabled     bool
	LocalCodeEngine LocalCodeEngine
	AutofixEnabled  bool
	ApiError        *VulnmapApiError
}

func (*FakeApiClient) Clear

func (f *FakeApiClient) Clear()

func (*FakeApiClient) GetAllCalls

func (f *FakeApiClient) GetAllCalls(op string) [][]any

func (*FakeApiClient) GetCallParams

func (f *FakeApiClient) GetCallParams(callNo int, op string) []any

func (*FakeApiClient) SastSettings

func (f *FakeApiClient) SastSettings() (SastResponse, error)

type LocalCodeEngine

type LocalCodeEngine struct {
	AllowCloudUpload bool   `json:"allowCloudUpload"`
	Url              string `json:"url"`
	Enabled          bool   `json:"enabled"`
}

type SastResponse

type SastResponse struct {
	SastEnabled                 bool            `json:"sastEnabled"`
	LocalCodeEngine             LocalCodeEngine `json:"localCodeEngine"`
	Org                         string          `json:"org"`
	SupportedLanguages          []string        `json:"supportedLanguages"`
	ReportFalsePositivesEnabled bool            `json:"reportFalsePositivesEnabled"`
	AutofixEnabled              bool            `json:"autofixEnabled"`
}

type VulnmapApiClient

type VulnmapApiClient interface {
	SastSettings() (SastResponse, error)
}

func NewVulnmapApiClient

func NewVulnmapApiClient(client func() *http.Client) VulnmapApiClient

type VulnmapApiClientImpl

type VulnmapApiClientImpl struct {
	// contains filtered or unexported fields
}

func (*VulnmapApiClientImpl) SastSettings

func (s *VulnmapApiClientImpl) SastSettings() (SastResponse, error)

type VulnmapApiError

type VulnmapApiError struct {
	// contains filtered or unexported fields
}

func NewVulnmapApiError

func NewVulnmapApiError(msg string, statusCode int) *VulnmapApiError

func (*VulnmapApiError) Error

func (e *VulnmapApiError) Error() string

func (*VulnmapApiError) StatusCode

func (e *VulnmapApiError) StatusCode() int

Jump to

Keyboard shortcuts

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