mocks

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: Apache-2.0 Imports: 5 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 {
	ExportSBOMFunc       func(inputDir string) (*scaplugin.Finding, error)
	ShouldExportSBOMFunc func(inputDir string, logger *zerolog.Logger) bool
}

MockUVClient is a mock implementation of UVClient for testing

func (*MockUVClient) ExportSBOM

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

func (*MockUVClient) ShouldExportSBOM

func (m *MockUVClient) ShouldExportSBOM(inputDir string, logger *zerolog.Logger) bool

Jump to

Keyboard shortcuts

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