Documentation
¶
Overview ¶
Package mocks contains generated test doubles for MCP adapter ports.
Index ¶
- type MockInvocationResolver
- type MockInvocationResolver_Expecter
- type MockInvocationResolver_Resolve_Call
- func (_c *MockInvocationResolver_Resolve_Call) Return(subject authz.Subject, err error) *MockInvocationResolver_Resolve_Call
- func (_c *MockInvocationResolver_Resolve_Call) Run(run func(ctx context.Context)) *MockInvocationResolver_Resolve_Call
- func (_c *MockInvocationResolver_Resolve_Call) RunAndReturn(run func(ctx context.Context) (authz.Subject, error)) *MockInvocationResolver_Resolve_Call
- type MockService
- func (_mock *MockService) Describe(name codemode.CapabilityName) (codemode.Description, error)
- func (_m *MockService) EXPECT() *MockService_Expecter
- func (_mock *MockService) Execute(ctx context.Context, subject authz.Subject, program codemode.Program) (any, error)
- func (_mock *MockService) Search(query string) (codemode.SearchResponse, error)
- type MockService_Describe_Call
- func (_c *MockService_Describe_Call) Return(v codemode.Description, err error) *MockService_Describe_Call
- func (_c *MockService_Describe_Call) Run(run func(name codemode.CapabilityName)) *MockService_Describe_Call
- func (_c *MockService_Describe_Call) RunAndReturn(run func(name codemode.CapabilityName) (codemode.Description, error)) *MockService_Describe_Call
- type MockService_Execute_Call
- func (_c *MockService_Execute_Call) Return(v any, err error) *MockService_Execute_Call
- func (_c *MockService_Execute_Call) Run(run func(ctx context.Context, subject authz.Subject, program codemode.Program)) *MockService_Execute_Call
- func (_c *MockService_Execute_Call) RunAndReturn(...) *MockService_Execute_Call
- type MockService_Expecter
- type MockService_Search_Call
- func (_c *MockService_Search_Call) Return(v codemode.SearchResponse, err error) *MockService_Search_Call
- func (_c *MockService_Search_Call) Run(run func(query string)) *MockService_Search_Call
- func (_c *MockService_Search_Call) RunAndReturn(run func(query string) (codemode.SearchResponse, error)) *MockService_Search_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockInvocationResolver ¶
MockInvocationResolver is an autogenerated mock type for the InvocationResolver type
func NewMockInvocationResolver ¶
func NewMockInvocationResolver(t interface {
mock.TestingT
Cleanup(func())
}) *MockInvocationResolver
NewMockInvocationResolver creates a new instance of MockInvocationResolver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockInvocationResolver) EXPECT ¶
func (_m *MockInvocationResolver) EXPECT() *MockInvocationResolver_Expecter
type MockInvocationResolver_Expecter ¶
type MockInvocationResolver_Expecter struct {
// contains filtered or unexported fields
}
func (*MockInvocationResolver_Expecter) Resolve ¶
func (_e *MockInvocationResolver_Expecter) Resolve(ctx any) *MockInvocationResolver_Resolve_Call
Resolve is a helper method to define mock.On call
- ctx context.Context
type MockInvocationResolver_Resolve_Call ¶
MockInvocationResolver_Resolve_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Resolve'
func (*MockInvocationResolver_Resolve_Call) Return ¶
func (_c *MockInvocationResolver_Resolve_Call) Return(subject authz.Subject, err error) *MockInvocationResolver_Resolve_Call
func (*MockInvocationResolver_Resolve_Call) Run ¶
func (_c *MockInvocationResolver_Resolve_Call) Run(run func(ctx context.Context)) *MockInvocationResolver_Resolve_Call
func (*MockInvocationResolver_Resolve_Call) RunAndReturn ¶
func (_c *MockInvocationResolver_Resolve_Call) RunAndReturn(run func(ctx context.Context) (authz.Subject, error)) *MockInvocationResolver_Resolve_Call
type MockService ¶
MockService is an autogenerated mock type for the Service type
func NewMockService ¶
func NewMockService(t interface {
mock.TestingT
Cleanup(func())
}) *MockService
NewMockService creates a new instance of MockService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockService) Describe ¶
func (_mock *MockService) Describe(name codemode.CapabilityName) (codemode.Description, error)
Describe provides a mock function for the type MockService
func (*MockService) EXPECT ¶
func (_m *MockService) EXPECT() *MockService_Expecter
func (*MockService) Execute ¶
func (_mock *MockService) Execute(ctx context.Context, subject authz.Subject, program codemode.Program) (any, error)
Execute provides a mock function for the type MockService
func (*MockService) Search ¶
func (_mock *MockService) Search(query string) (codemode.SearchResponse, error)
Search provides a mock function for the type MockService
type MockService_Describe_Call ¶
MockService_Describe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Describe'
func (*MockService_Describe_Call) Return ¶
func (_c *MockService_Describe_Call) Return(v codemode.Description, err error) *MockService_Describe_Call
func (*MockService_Describe_Call) Run ¶
func (_c *MockService_Describe_Call) Run(run func(name codemode.CapabilityName)) *MockService_Describe_Call
func (*MockService_Describe_Call) RunAndReturn ¶
func (_c *MockService_Describe_Call) RunAndReturn(run func(name codemode.CapabilityName) (codemode.Description, error)) *MockService_Describe_Call
type MockService_Execute_Call ¶
MockService_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
func (*MockService_Execute_Call) Return ¶
func (_c *MockService_Execute_Call) Return(v any, err error) *MockService_Execute_Call
func (*MockService_Execute_Call) Run ¶
func (_c *MockService_Execute_Call) Run(run func(ctx context.Context, subject authz.Subject, program codemode.Program)) *MockService_Execute_Call
func (*MockService_Execute_Call) RunAndReturn ¶
func (_c *MockService_Execute_Call) RunAndReturn(run func(ctx context.Context, subject authz.Subject, program codemode.Program) (any, error)) *MockService_Execute_Call
type MockService_Expecter ¶
type MockService_Expecter struct {
// contains filtered or unexported fields
}
func (*MockService_Expecter) Describe ¶
func (_e *MockService_Expecter) Describe(name any) *MockService_Describe_Call
Describe is a helper method to define mock.On call
- name codemode.CapabilityName
func (*MockService_Expecter) Execute ¶
func (_e *MockService_Expecter) Execute(ctx any, subject any, program any) *MockService_Execute_Call
Execute is a helper method to define mock.On call
- ctx context.Context
- subject authz.Subject
- program codemode.Program
func (*MockService_Expecter) Search ¶
func (_e *MockService_Expecter) Search(query any) *MockService_Search_Call
Search is a helper method to define mock.On call
- query string
type MockService_Search_Call ¶
MockService_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search'
func (*MockService_Search_Call) Return ¶
func (_c *MockService_Search_Call) Return(v codemode.SearchResponse, err error) *MockService_Search_Call
func (*MockService_Search_Call) Run ¶
func (_c *MockService_Search_Call) Run(run func(query string)) *MockService_Search_Call
func (*MockService_Search_Call) RunAndReturn ¶
func (_c *MockService_Search_Call) RunAndReturn(run func(query string) (codemode.SearchResponse, error)) *MockService_Search_Call