Documentation
¶
Index ¶
- func AssertChecklistCoverage(t testing.TB, registered []string, checklist []string)
- func ListTools(t testing.TB, server *Server, token string, sessionID string) []string
- func ListToolsURL(t testing.TB, mcpURL string, token string, sessionID string) []string
- func MintToken(t testing.TB, scopes ...string) string
- func RunHandshake(t testing.TB, server *Server, token string) string
- func RunHandshakeURL(t testing.TB, mcpURL string, token string) string
- func TokenValidator(t testing.TB) oauth.TokenValidator
- type Server
- type User
- type UserStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertChecklistCoverage ¶
AssertChecklistCoverage fails if any checklist item is not registered.
func ListToolsURL ¶
ListToolsURL calls tools/list at mcpURL and returns tool names.
func RunHandshake ¶
RunHandshake initializes a Streamable HTTP MCP session and returns Mcp-Session-Id.
func RunHandshakeURL ¶
RunHandshakeURL initializes a Streamable HTTP MCP session at mcpURL.
func TokenValidator ¶
func TokenValidator(t testing.TB) oauth.TokenValidator
TokenValidator returns a test-only validator for tokens produced by MintToken.
Types ¶
type Server ¶
type Server struct {
URL string
MCPURL string
HTTPServer *httptest.Server
UserStore *UserStore
RegisteredTools []string
}
Server is an in-memory mcp-kit server for tests.
type User ¶
type User struct {
IDValue uuid.UUID
EmailValue string
PasswordHashValue []byte
Active bool
Scopes []string
}
User is an in-memory test user with configurable scopes.
func (User) PasswordHash ¶
type UserStore ¶
type UserStore struct {
// contains filtered or unexported fields
}
UserStore is an in-memory userstore.Store implementation.
func NewUserStore ¶
NewUserStore creates a single-user in-memory user store.
func (*UserStore) FindByEmail ¶
Click to show internal directories.
Click to hide internal directories.