mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
This PR merges code from `coder/aibridge` repository into `coder/coder`. It was split into 4 PRs for easier review but stacked PRs will need to be merged into this PR so all checks pass. * https://github.com/coder/coder/pull/24190 -> raw code copy (this PR, before merging PRs on top of it, it was just 1 commit: https://github.com/coder/coder/commit/70d33f33200c7e77df910957595715f81f9bec24) * https://github.com/coder/coder/pull/24570 -> update imports in `coder/coder` to use copied code * https://github.com/coder/coder/pull/24586 -> linter fixes and CI integration (also added README.md) * https://github.com/coder/coder/pull/24571 -> added exclude to scripts/check_emdash.sh check Original PR message (before PR squash): Moves coder/aibridge code into coder/coder repository. Omitted files: - `go.mod`, `go.sum`, `.gitignore`, `.github/workflows/ci.yml,` `Makefile`, `LICENSE`, `README.md` (modified README.md is added later) - `.github`, `example`, `buildinfo,` `scripts` directories Simple verification script (will list omitted files) ``` tmp=$(mktemp -d) echo "$tmp" git clone --depth=1 https://github.com/coder/aibridge "$tmp/aibridge" git clone --depth=1 --branch pb/aibridge-code-move https://github.com/coder/coder "$tmp/coder" diff -rq --exclude=.git "$tmp/aibridge" "$tmp/coder/aibridge" # rm -rf "$tmp" ```
115 lines
3.6 KiB
Go
115 lines
3.6 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: github.com/coder/aibridge/mcp (interfaces: ServerProxier)
|
|
//
|
|
// Generated by this command:
|
|
//
|
|
// mockgen -destination ./mcpmock.go -package mcpmock github.com/coder/aibridge/mcp ServerProxier
|
|
//
|
|
|
|
// Package mcpmock is a generated GoMock package.
|
|
package mcpmock
|
|
|
|
import (
|
|
context "context"
|
|
reflect "reflect"
|
|
|
|
mcp "github.com/coder/coder/v2/aibridge/mcp"
|
|
mcp0 "github.com/mark3labs/mcp-go/mcp"
|
|
gomock "go.uber.org/mock/gomock"
|
|
)
|
|
|
|
// MockServerProxier is a mock of ServerProxier interface.
|
|
type MockServerProxier struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockServerProxierMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockServerProxierMockRecorder is the mock recorder for MockServerProxier.
|
|
type MockServerProxierMockRecorder struct {
|
|
mock *MockServerProxier
|
|
}
|
|
|
|
// NewMockServerProxier creates a new mock instance.
|
|
func NewMockServerProxier(ctrl *gomock.Controller) *MockServerProxier {
|
|
mock := &MockServerProxier{ctrl: ctrl}
|
|
mock.recorder = &MockServerProxierMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockServerProxier) EXPECT() *MockServerProxierMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// CallTool mocks base method.
|
|
func (m *MockServerProxier) CallTool(ctx context.Context, name string, input any) (*mcp0.CallToolResult, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "CallTool", ctx, name, input)
|
|
ret0, _ := ret[0].(*mcp0.CallToolResult)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// CallTool indicates an expected call of CallTool.
|
|
func (mr *MockServerProxierMockRecorder) CallTool(ctx, name, input any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CallTool", reflect.TypeOf((*MockServerProxier)(nil).CallTool), ctx, name, input)
|
|
}
|
|
|
|
// GetTool mocks base method.
|
|
func (m *MockServerProxier) GetTool(id string) *mcp.Tool {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetTool", id)
|
|
ret0, _ := ret[0].(*mcp.Tool)
|
|
return ret0
|
|
}
|
|
|
|
// GetTool indicates an expected call of GetTool.
|
|
func (mr *MockServerProxierMockRecorder) GetTool(id any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTool", reflect.TypeOf((*MockServerProxier)(nil).GetTool), id)
|
|
}
|
|
|
|
// Init mocks base method.
|
|
func (m *MockServerProxier) Init(arg0 context.Context) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Init", arg0)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Init indicates an expected call of Init.
|
|
func (mr *MockServerProxierMockRecorder) Init(arg0 any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockServerProxier)(nil).Init), arg0)
|
|
}
|
|
|
|
// ListTools mocks base method.
|
|
func (m *MockServerProxier) ListTools() []*mcp.Tool {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "ListTools")
|
|
ret0, _ := ret[0].([]*mcp.Tool)
|
|
return ret0
|
|
}
|
|
|
|
// ListTools indicates an expected call of ListTools.
|
|
func (mr *MockServerProxierMockRecorder) ListTools() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListTools", reflect.TypeOf((*MockServerProxier)(nil).ListTools))
|
|
}
|
|
|
|
// Shutdown mocks base method.
|
|
func (m *MockServerProxier) Shutdown(ctx context.Context) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Shutdown", ctx)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Shutdown indicates an expected call of Shutdown.
|
|
func (mr *MockServerProxierMockRecorder) Shutdown(ctx any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Shutdown", reflect.TypeOf((*MockServerProxier)(nil).Shutdown), ctx)
|
|
}
|