mock

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCacheKey

func GenerateCacheKey(mockRequest MockRequest) string

Types

type MockRequest

type MockRequest struct {
	Host   string
	Method string
	URI    string
	Accept string
	Uuid   string
}

type MockResponse

type MockResponse struct {
	StatusCode  int
	Data        *[]byte
	ContentType string
	Headers     *map[string]string
	// contains filtered or unexported fields
}

func (*MockResponse) AddHeaders added in v1.3.0

func (m *MockResponse) AddHeaders(headers map[string]string)

AddHeaders adds the provided headers to the MockResponse, merging with existing headers if present

type MockServiceFactory added in v1.2.0

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

func NewMockServiceFactory added in v1.2.0

func NewMockServiceFactory(
	contentService content.ContentService,
	cacheService cache.CacheService,
	arguments *config.AppArguments,
	hostsConfig *config.HostsConfig,
) *MockServiceFactory

func (*MockServiceFactory) GetMockResponse added in v1.2.0

func (m *MockServiceFactory) GetMockResponse(mockRequest MockRequest) *MockResponse

type MockServiceParams added in v1.2.0

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

Jump to

Keyboard shortcuts

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