Documentation
¶
Index ¶
- func AdminAuthMiddleware() gin.HandlerFunc
- type Handler
- func (h *Handler) ChangePassword(c *gin.Context)
- func (h *Handler) CreateTenant(c *gin.Context)
- func (h *Handler) CreateUser(c *gin.Context)
- func (h *Handler) DeleteTenant(c *gin.Context)
- func (h *Handler) DeleteUser(c *gin.Context)
- func (h *Handler) GetTenantInfo(c *gin.Context)
- func (h *Handler) GetUserInfo(c *gin.Context)
- func (h *Handler) GetUserWithTenants(c *gin.Context)
- func (h *Handler) ListTenants(c *gin.Context)
- func (h *Handler) ListUsers(c *gin.Context)
- func (h *Handler) Login(c *gin.Context)
- func (h *Handler) UpdateTenant(c *gin.Context)
- func (h *Handler) UpdateUser(c *gin.Context)
- func (h *Handler) UpdateUserTenants(c *gin.Context)
- type MCP
- func (h *MCP) HandleGetCapabilities(c *gin.Context)
- func (h *MCP) HandleGetConfigNames(c *gin.Context)
- func (h *MCP) HandleGetConfigVersions(c *gin.Context)
- func (h *MCP) HandleListMCPServers(c *gin.Context)
- func (h *MCP) HandleMCPServerCreate(c *gin.Context)
- func (h *MCP) HandleMCPServerDelete(c *gin.Context)
- func (h *MCP) HandleMCPServerSync(c *gin.Context)
- func (h *MCP) HandleMCPServerUpdate(c *gin.Context)
- func (h *MCP) HandleSetActiveVersion(c *gin.Context)
- func (h *MCP) StartCapabilitiesSync(ctx context.Context)
- type OAuthHandler
- type OpenAPI
- type RuntimeConfigHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminAuthMiddleware ¶
func AdminAuthMiddleware() gin.HandlerFunc
AdminAuthMiddleware creates a middleware that checks if the user has admin role
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler represents the authentication handler
func NewHandler ¶
func NewHandler(db database.Database, jwtService *jwt.Service, cfg *config.MCPGatewayConfig, logger *zap.Logger) *Handler
NewHandler creates a new authentication handler
func (*Handler) ChangePassword ¶
ChangePassword handles password change requests
func (*Handler) CreateTenant ¶
CreateTenant handles tenant creation
func (*Handler) CreateUser ¶
CreateUser handles user creation
func (*Handler) DeleteTenant ¶
DeleteTenant handles tenant deletion
func (*Handler) DeleteUser ¶
DeleteUser handles user deletion
func (*Handler) GetTenantInfo ¶
GetTenantInfo handles getting tenant info by name
func (*Handler) GetUserInfo ¶
GetUserInfo handles getting current user info
func (*Handler) GetUserWithTenants ¶
GetUserWithTenants gets a user with their associated tenants
func (*Handler) ListTenants ¶
ListTenants handles listing all tenants
func (*Handler) UpdateTenant ¶
UpdateTenant handles tenant updates
func (*Handler) UpdateUser ¶
UpdateUser handles user updates
func (*Handler) UpdateUserTenants ¶
UpdateUserTenants updates the tenant associations for a user
type MCP ¶
type MCP struct {
// contains filtered or unexported fields
}
func (*MCP) HandleGetCapabilities ¶ added in v0.9.0
HandleGetCapabilities handles GET /api/mcp/capabilities/:tenant/:name
func (*MCP) HandleGetConfigNames ¶
HandleGetConfigNames handles the request to get all configuration names
func (*MCP) HandleGetConfigVersions ¶
HandleGetConfigVersions handles the request to get configuration versions
func (*MCP) HandleListMCPServers ¶
func (*MCP) HandleMCPServerCreate ¶
func (*MCP) HandleMCPServerDelete ¶
func (*MCP) HandleMCPServerSync ¶
func (*MCP) HandleMCPServerUpdate ¶
func (*MCP) HandleSetActiveVersion ¶
HandleSetActiveVersion handles setting a version as active
func (*MCP) StartCapabilitiesSync ¶ added in v0.9.0
StartCapabilitiesSync starts a background goroutine to periodically refresh capabilities for all configured MCP backends. It performs an immediate refresh on start and then ticks at the configured interval.
TODO: For multi-instance deployments, add coordination (e.g., distributed locks) to avoid redundant refreshes across instances.
type OAuthHandler ¶ added in v0.9.0
type OAuthHandler struct {
// contains filtered or unexported fields
}
OAuthHandler handles external OAuth authentication
func NewOAuthHandler ¶ added in v0.9.0
func NewOAuthHandler(db database.Database, jwtService *jwt.Service, authService auth.Auth, logger *zap.Logger) *OAuthHandler
NewOAuthHandler creates a new OAuth handler
func (*OAuthHandler) GetOAuthProviders ¶ added in v0.9.0
func (h *OAuthHandler) GetOAuthProviders(c *gin.Context)
GetOAuthProviders returns available OAuth providers
func (*OAuthHandler) GitHubCallback ¶ added in v0.9.0
func (h *OAuthHandler) GitHubCallback(c *gin.Context)
GitHubCallback handles GitHub OAuth callback
func (*OAuthHandler) GitHubLogin ¶ added in v0.9.0
func (h *OAuthHandler) GitHubLogin(c *gin.Context)
GitHubLogin initiates GitHub OAuth login
func (*OAuthHandler) GoogleCallback ¶ added in v0.9.0
func (h *OAuthHandler) GoogleCallback(c *gin.Context)
GoogleCallback handles Google OAuth callback
func (*OAuthHandler) GoogleLogin ¶ added in v0.9.0
func (h *OAuthHandler) GoogleLogin(c *gin.Context)
GoogleLogin initiates Google OAuth login
type OpenAPI ¶
type OpenAPI struct {
// contains filtered or unexported fields
}
OpenAPI handles OpenAPI related operations
func NewOpenAPI ¶
func NewOpenAPI(db database.Database, store storage.Store, ntf notifier.Notifier, logger *zap.Logger) *OpenAPI
NewOpenAPI creates a new OpenAPI handler
func (*OpenAPI) HandleImport ¶
HandleImport handles OpenAPI import requests
type RuntimeConfigHandler ¶ added in v0.8.4
type RuntimeConfigHandler struct {
// contains filtered or unexported fields
}
RuntimeConfigHandler represents the runtime configuration handler
func NewRuntimeConfigHandler ¶ added in v0.8.4
func NewRuntimeConfigHandler(cfg *config.APIServerConfig) *RuntimeConfigHandler
NewRuntimeConfigHandler creates a new runtime configuration handler
func (*RuntimeConfigHandler) HandleRuntimeConfig ¶ added in v0.8.4
func (h *RuntimeConfigHandler) HandleRuntimeConfig(c *gin.Context)
HandleRuntimeConfig serves frontend runtime config as JSON