mocks

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockSBOMService

func NewMockSBOMService(resp MockResponse, assertions ...func(r *http.Request)) *httptest.Server

func NewMockSBOMServiceMultiResponse

func NewMockSBOMServiceMultiResponse(responses []MockResponse, assertions ...func(r *http.Request)) *httptest.Server

Types

type MockResponse

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

func NewMockResponse

func NewMockResponse(c string, b []byte, status int) MockResponse

func NewMockResponseWithHeaders

func NewMockResponseWithHeaders(c string, b []byte, status int, headers http.Header) MockResponse

type MockUVClient

type MockUVClient struct {
	CalledDirs []string
	ReturnErr  error
	ErrorDirs  map[string]error
}

func (*MockUVClient) ExportSBOM

func (m *MockUVClient) ExportSBOM(inputDir string, _ *scaplugin.Options) (*scaplugin.Finding, error)

Jump to

Keyboard shortcuts

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