registry

package
v1.3.0-beta Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockRegistry

type MockRegistry struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewMockRegistry

func NewMockRegistry() *MockRegistry

func (*MockRegistry) FindHTTPMock

func (r *MockRegistry) FindHTTPMock(url string, method string) (*types.ExpectStatement, bool)

FindHTTPMock finds an HTTP mock matching both URL and method

func (*MockRegistry) FindHTTPMockWithHeaders

func (r *MockRegistry) FindHTTPMockWithHeaders(url string, method string, headers map[string]string) (*types.ExpectStatement, bool)

FindHTTPMockWithHeaders finds an HTTP mock matching URL, method, and headers

func (*MockRegistry) FindMock

func (r *MockRegistry) FindMock(key string, query string) (*types.ExpectStatement, bool)

func (*MockRegistry) GetHits

func (r *MockRegistry) GetHits() map[string]int

func (*MockRegistry) GetTables

func (r *MockRegistry) GetTables() []string

GetTables returns a list of unique table names registered in the registry

func (*MockRegistry) LoadFromFile

func (r *MockRegistry) LoadFromFile(path string) error

func (*MockRegistry) PeekMock

func (r *MockRegistry) PeekMock(key string, query string) (*types.ExpectStatement, bool)

PeekMock checks if a mock exists without incrementing hit count (used for testing intercept)

func (*MockRegistry) Register

func (r *MockRegistry) Register(spec *types.TestSpec)

func (*MockRegistry) ResetHits

func (r *MockRegistry) ResetHits()

ResetHits resets the hit count for all mocks (useful for testing)

func (*MockRegistry) SaveToFile

func (r *MockRegistry) SaveToFile(path string) error

func (*MockRegistry) SetHits

func (r *MockRegistry) SetHits(hostHits map[string]int)

func (*MockRegistry) VerifyAll

func (r *MockRegistry) VerifyAll() error

Jump to

Keyboard shortcuts

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