Versions in this module Expand all Collapse all v1 v1.1.0 Apr 19, 2025 v1.0.0 Apr 18, 2025 Changes in this version + type Config struct + Path string + type DB struct + func New(dataSourceName string) (*DB, error) + func (db *DB) AddServer(name, url string) (int64, error) + func (db *DB) Close() error + func (db *DB) GetServerByID(id int64) (*models.MCPServer, error) + func (db *DB) GetServerByURL(url string) (*models.MCPServer, error) + func (db *DB) ListServers() ([]models.MCPServer, error) + func (db *DB) ListTools() ([]models.Tool, error) + func (db *DB) ListToolsByServerID(serverID int64) ([]models.Tool, error) + func (db *DB) RemoveServer(id int64) error + func (db *DB) RemoveToolsByServerID(serverID int64) error + func (db *DB) UpdateServerDetails(id int64, name, url string) error + func (db *DB) UpdateServerStatus(id int64, state models.ConnectionState, lastError *string, lastCheck time.Time) error + func (db *DB) UpsertTool(tool models.Tool) (err error) + type DBInterface interface + AddServer func(name, url string) (int64, error) + Close func() error + GetServerByID func(id int64) (*models.MCPServer, error) + GetServerByURL func(url string) (*models.MCPServer, error) + ListServers func() ([]models.MCPServer, error) + ListTools func() ([]models.Tool, error) + ListToolsByServerID func(serverID int64) ([]models.Tool, error) + RemoveServer func(id int64) error + RemoveToolsByServerID func(serverID int64) error + UpdateServerDetails func(id int64, name, url string) error + UpdateServerStatus func(id int64, state models.ConnectionState, lastError *string, lastCheck time.Time) error + UpsertTool func(tool models.Tool) error