Documentation
¶
Index ¶
- type AuthController
- type AuthInfoController
- type AuthMiddleware
- type AuthStatusResponse
- type AuthType
- type AuthTypesResponse
- type BedrockSettingsRequest
- type BedrockSettingsResponse
- type CreateSubscriptionRequest
- type GitHubLoginRequest
- type HealthController
- type LoginRequest
- type MCPServerRequest
- type MCPServerResponse
- type MarketplaceRequest
- type MarketplaceResponse
- type NotificationController
- type NotificationHandlers
- func (h *NotificationHandlers) DeleteSubscription(c echo.Context) error
- func (h *NotificationHandlers) GetHistory(c echo.Context) error
- func (h *NotificationHandlers) GetSubscriptions(c echo.Context) error
- func (h *NotificationHandlers) Subscribe(c echo.Context) error
- func (h *NotificationHandlers) Webhook(c echo.Context) error
- type SendNotificationRequest
- type SessionController
- func (c *SessionController) DeleteSession(ctx echo.Context) error
- func (c *SessionController) GetName() string
- func (c *SessionController) RegisterRoutes(e *echo.Echo) error
- func (c *SessionController) RouteToSession(ctx echo.Context) error
- func (c *SessionController) SearchSessions(ctx echo.Context) error
- func (c *SessionController) StartSession(ctx echo.Context) error
- type SessionCreator
- type SessionManagerProvider
- type SettingsController
- func (c *SettingsController) DeleteSettings(ctx echo.Context) error
- func (c *SettingsController) GetName() string
- func (c *SettingsController) GetSettings(ctx echo.Context) error
- func (c *SettingsController) SetCredentialsSecretSyncer(syncer services.CredentialsSecretSyncer)
- func (c *SettingsController) SetMCPSecretSyncer(syncer services.MCPSecretSyncer)
- func (c *SettingsController) SetMarketplaceSecretSyncer(syncer services.MarketplaceSecretSyncer)
- func (c *SettingsController) UpdateSettings(ctx echo.Context) error
- type SettingsResponse
- type ShareController
- type UpdateSettingsRequest
- type UserController
- type UserInfoResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthController ¶
type AuthController struct {
// contains filtered or unexported fields
}
AuthController handles HTTP requests for authentication operations
func NewAuthController ¶
func NewAuthController( authenticateUserUC *auth.AuthenticateUserUseCase, validateAPIKeyUC *auth.ValidateAPIKeyUseCase, githubAuthenticateUC *auth.GitHubAuthenticateUseCase, validatePermissionUC *auth.ValidatePermissionUseCase, authPresenter presenters.AuthPresenter, ) *AuthController
NewAuthController creates a new AuthController
func (*AuthController) GitHubLogin ¶
func (c *AuthController) GitHubLogin(w http.ResponseWriter, r *http.Request)
GitHubLogin handles POST /auth/github
func (*AuthController) Login ¶
func (c *AuthController) Login(w http.ResponseWriter, r *http.Request)
Login handles POST /auth/login
func (*AuthController) Logout ¶
func (c *AuthController) Logout(w http.ResponseWriter, r *http.Request)
Logout handles POST /auth/logout
func (*AuthController) ValidateAPIKey ¶
func (c *AuthController) ValidateAPIKey(w http.ResponseWriter, r *http.Request)
ValidateAPIKey handles POST /auth/validate
type AuthInfoController ¶ added in v1.148.0
type AuthInfoController struct {
// contains filtered or unexported fields
}
AuthInfoController handles auth info-related HTTP requests
func NewAuthInfoController ¶ added in v1.148.0
func NewAuthInfoController(cfg *config.Config) *AuthInfoController
NewAuthInfoController creates a new AuthInfoController
func (*AuthInfoController) GetAuthStatus ¶ added in v1.148.0
func (c *AuthInfoController) GetAuthStatus(ctx echo.Context) error
GetAuthStatus returns current authentication status
func (*AuthInfoController) GetAuthTypes ¶ added in v1.148.0
func (c *AuthInfoController) GetAuthTypes(ctx echo.Context) error
GetAuthTypes returns available authentication types
type AuthMiddleware ¶
type AuthMiddleware struct {
// contains filtered or unexported fields
}
AuthMiddleware provides authentication middleware
func NewAuthMiddleware ¶
func NewAuthMiddleware( validateAPIKeyUC *auth.ValidateAPIKeyUseCase, authPresenter presenters.AuthPresenter, ) *AuthMiddleware
NewAuthMiddleware creates a new AuthMiddleware
func (*AuthMiddleware) Authenticate ¶
func (m *AuthMiddleware) Authenticate(next http.Handler) http.Handler
Authenticate is a middleware that validates API keys and sets user context
type AuthStatusResponse ¶ added in v1.148.0
type AuthStatusResponse struct {
Authenticated bool `json:"authenticated"`
AuthType string `json:"auth_type,omitempty"`
UserID string `json:"user_id,omitempty"`
Role string `json:"role,omitempty"`
Permissions []string `json:"permissions,omitempty"`
GitHubUser *auth.GitHubUserInfo `json:"github_user,omitempty"`
}
AuthStatusResponse represents the response for auth status
type AuthType ¶ added in v1.148.0
type AuthType struct {
Type string `json:"type"`
Name string `json:"name"`
Available bool `json:"available"`
}
AuthType represents a single authentication type
type AuthTypesResponse ¶ added in v1.148.0
AuthTypesResponse represents the response for available auth types
type BedrockSettingsRequest ¶ added in v1.148.0
type BedrockSettingsRequest struct {
Enabled bool `json:"enabled"`
Model string `json:"model,omitempty"`
AccessKeyID string `json:"access_key_id,omitempty"`
SecretAccessKey string `json:"secret_access_key,omitempty"`
RoleARN string `json:"role_arn,omitempty"`
Profile string `json:"profile,omitempty"`
}
BedrockSettingsRequest is the request body for Bedrock settings
type BedrockSettingsResponse ¶ added in v1.148.0
type BedrockSettingsResponse struct {
Enabled bool `json:"enabled"`
Model string `json:"model,omitempty"`
AccessKeyID string `json:"access_key_id,omitempty"`
SecretAccessKey string `json:"secret_access_key,omitempty"`
RoleARN string `json:"role_arn,omitempty"`
Profile string `json:"profile,omitempty"`
}
BedrockSettingsResponse is the response body for Bedrock settings
type CreateSubscriptionRequest ¶
type CreateSubscriptionRequest struct {
Type string `json:"type"`
Endpoint string `json:"endpoint"`
Keys map[string]string `json:"keys,omitempty"`
}
CreateSubscriptionRequest represents the HTTP request for creating a subscription
type GitHubLoginRequest ¶
type GitHubLoginRequest struct {
Token string `json:"token"`
}
GitHubLoginRequest represents the HTTP request for GitHub login
type HealthController ¶ added in v1.148.0
type HealthController struct{}
HealthController handles health check endpoints
func NewHealthController ¶ added in v1.148.0
func NewHealthController() *HealthController
NewHealthController creates a new HealthController instance
func (*HealthController) GetName ¶ added in v1.148.0
func (c *HealthController) GetName() string
GetName returns the name of this controller for logging
func (*HealthController) HealthCheck ¶ added in v1.148.0
func (c *HealthController) HealthCheck(ctx echo.Context) error
HealthCheck handles GET /health requests to check server health
type LoginRequest ¶
type LoginRequest struct {
Type string `json:"type"` // "password", "token", "api_key"
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
Token string `json:"token,omitempty"`
APIKey string `json:"api_key,omitempty"`
}
LoginRequest represents the HTTP request for user login
type MCPServerRequest ¶ added in v1.148.0
type MCPServerRequest struct {
Type string `json:"type"` // "stdio", "http", "sse"
URL string `json:"url,omitempty"` // for http/sse
Command string `json:"command,omitempty"` // for stdio
Args []string `json:"args,omitempty"` // for stdio
Env map[string]string `json:"env,omitempty"` // environment variables
Headers map[string]string `json:"headers,omitempty"` // for http/sse
}
MCPServerRequest is the request body for a single MCP server
type MCPServerResponse ¶ added in v1.148.0
type MCPServerResponse struct {
Type string `json:"type"`
URL string `json:"url,omitempty"`
Command string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
EnvKeys []string `json:"env_keys,omitempty"` // only keys, not values
HeaderKeys []string `json:"header_keys,omitempty"` // only keys, not values
}
MCPServerResponse is the response body for a single MCP server
type MarketplaceRequest ¶ added in v1.148.0
type MarketplaceRequest struct {
URL string `json:"url"`
}
MarketplaceRequest is the request body for a single marketplace
type MarketplaceResponse ¶ added in v1.148.0
type MarketplaceResponse struct {
URL string `json:"url"`
}
MarketplaceResponse is the response body for a single marketplace
type NotificationController ¶
type NotificationController struct {
// contains filtered or unexported fields
}
NotificationController handles HTTP requests for notification operations
func NewNotificationController ¶
func NewNotificationController( sendNotificationUC *notification.SendNotificationUseCase, manageSubscriptionUC *notification.ManageSubscriptionUseCase, notificationPresenter presenters.NotificationPresenter, ) *NotificationController
NewNotificationController creates a new NotificationController
func (*NotificationController) CreateSubscription ¶
func (c *NotificationController) CreateSubscription(w http.ResponseWriter, r *http.Request)
CreateSubscription handles POST /subscriptions
func (*NotificationController) DeleteSubscription ¶
func (c *NotificationController) DeleteSubscription(w http.ResponseWriter, r *http.Request)
DeleteSubscription handles DELETE /subscriptions/{id}
func (*NotificationController) SendNotification ¶
func (c *NotificationController) SendNotification(w http.ResponseWriter, r *http.Request)
SendNotification handles POST /notifications
type NotificationHandlers ¶ added in v1.148.0
type NotificationHandlers struct {
// contains filtered or unexported fields
}
NotificationHandlers handles notification-related HTTP requests This is a simpler handler that uses the notification.Service directly
func NewNotificationHandlers ¶ added in v1.148.0
func NewNotificationHandlers(service *notification.Service) *NotificationHandlers
NewNotificationHandlers creates new notification handlers
func (*NotificationHandlers) DeleteSubscription ¶ added in v1.148.0
func (h *NotificationHandlers) DeleteSubscription(c echo.Context) error
DeleteSubscription handles DELETE /notification/subscribe
func (*NotificationHandlers) GetHistory ¶ added in v1.148.0
func (h *NotificationHandlers) GetHistory(c echo.Context) error
GetHistory handles GET /notifications/history
func (*NotificationHandlers) GetSubscriptions ¶ added in v1.148.0
func (h *NotificationHandlers) GetSubscriptions(c echo.Context) error
GetSubscriptions handles GET /notification/subscribe
type SendNotificationRequest ¶
type SendNotificationRequest struct {
Title string `json:"title"`
Body string `json:"body"`
URL *string `json:"url,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
IconURL *string `json:"icon_url,omitempty"`
}
SendNotificationRequest represents the HTTP request for sending a notification
type SessionController ¶
type SessionController struct {
// contains filtered or unexported fields
}
SessionController handles session management endpoints
func NewSessionController ¶
func NewSessionController( sessionManagerProvider SessionManagerProvider, sessionCreator SessionCreator, ) *SessionController
NewSessionController creates a new SessionController instance
func (*SessionController) DeleteSession ¶
func (c *SessionController) DeleteSession(ctx echo.Context) error
DeleteSession handles DELETE /sessions/:sessionId requests to terminate a session
func (*SessionController) GetName ¶ added in v1.148.0
func (c *SessionController) GetName() string
GetName returns the name of this handler for logging
func (*SessionController) RegisterRoutes ¶ added in v1.148.0
func (c *SessionController) RegisterRoutes(e *echo.Echo) error
RegisterRoutes registers session management routes
func (*SessionController) RouteToSession ¶ added in v1.148.0
func (c *SessionController) RouteToSession(ctx echo.Context) error
RouteToSession routes requests to the appropriate agentapi server instance
func (*SessionController) SearchSessions ¶ added in v1.148.0
func (c *SessionController) SearchSessions(ctx echo.Context) error
SearchSessions handles GET /search requests to list and filter active sessions
func (*SessionController) StartSession ¶ added in v1.148.0
func (c *SessionController) StartSession(ctx echo.Context) error
StartSession handles POST /start requests to start a new agentapi server
type SessionCreator ¶ added in v1.148.0
type SessionCreator interface {
CreateSession(sessionID string, req entities.StartRequest, userID, userRole string, teams []string) (entities.Session, error)
DeleteSessionByID(sessionID string) error
}
SessionCreator is an interface for creating sessions
type SessionManagerProvider ¶ added in v1.148.0
type SessionManagerProvider interface {
GetSessionManager() repositories.SessionManager
}
SessionManagerProvider provides access to the session manager This allows the session manager to be swapped at runtime (e.g., for testing)
type SettingsController ¶ added in v1.148.0
type SettingsController struct {
// contains filtered or unexported fields
}
SettingsController handles settings-related HTTP requests
func NewSettingsController ¶ added in v1.148.0
func NewSettingsController(repo repositories.SettingsRepository) *SettingsController
NewSettingsController creates new settings controller
func (*SettingsController) DeleteSettings ¶ added in v1.148.0
func (c *SettingsController) DeleteSettings(ctx echo.Context) error
DeleteSettings handles DELETE /settings/:name
func (*SettingsController) GetName ¶ added in v1.148.0
func (c *SettingsController) GetName() string
GetName returns the name of this controller for logging
func (*SettingsController) GetSettings ¶ added in v1.148.0
func (c *SettingsController) GetSettings(ctx echo.Context) error
GetSettings handles GET /settings/:name
func (*SettingsController) SetCredentialsSecretSyncer ¶ added in v1.148.0
func (c *SettingsController) SetCredentialsSecretSyncer(syncer services.CredentialsSecretSyncer)
SetCredentialsSecretSyncer sets the credentials secret syncer
func (*SettingsController) SetMCPSecretSyncer ¶ added in v1.148.0
func (c *SettingsController) SetMCPSecretSyncer(syncer services.MCPSecretSyncer)
SetMCPSecretSyncer sets the MCP secret syncer
func (*SettingsController) SetMarketplaceSecretSyncer ¶ added in v1.148.0
func (c *SettingsController) SetMarketplaceSecretSyncer(syncer services.MarketplaceSecretSyncer)
SetMarketplaceSecretSyncer sets the marketplace secret syncer
func (*SettingsController) UpdateSettings ¶ added in v1.148.0
func (c *SettingsController) UpdateSettings(ctx echo.Context) error
UpdateSettings handles PUT /settings/:name
type SettingsResponse ¶ added in v1.148.0
type SettingsResponse struct {
Name string `json:"name"`
Bedrock *BedrockSettingsResponse `json:"bedrock,omitempty"`
MCPServers map[string]*MCPServerResponse `json:"mcp_servers,omitempty"`
Marketplaces map[string]*MarketplaceResponse `json:"marketplaces,omitempty"`
EnabledPlugins []string `json:"enabled_plugins,omitempty"` // plugin@marketplace format
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
SettingsResponse is the response body for settings
type ShareController ¶ added in v1.148.0
type ShareController struct {
// contains filtered or unexported fields
}
ShareController handles session sharing endpoints
func NewShareController ¶ added in v1.148.0
func NewShareController( sessionManagerProvider SessionManagerProvider, shareRepo repositories.ShareRepository, ) *ShareController
NewShareController creates a new ShareController instance
func (*ShareController) CreateShare ¶ added in v1.148.0
func (c *ShareController) CreateShare(ctx echo.Context) error
CreateShare handles POST /sessions/:sessionId/share to create a share URL
func (*ShareController) DeleteShare ¶ added in v1.148.0
func (c *ShareController) DeleteShare(ctx echo.Context) error
DeleteShare handles DELETE /sessions/:sessionId/share to revoke share
func (*ShareController) GetName ¶ added in v1.148.0
func (c *ShareController) GetName() string
GetName returns the name of this handler for logging
func (*ShareController) GetShare ¶ added in v1.148.0
func (c *ShareController) GetShare(ctx echo.Context) error
GetShare handles GET /sessions/:sessionId/share to get share status
func (*ShareController) RouteToSharedSession ¶ added in v1.148.0
func (c *ShareController) RouteToSharedSession(ctx echo.Context) error
RouteToSharedSession handles ANY /s/:shareToken/* to access shared session
type UpdateSettingsRequest ¶ added in v1.148.0
type UpdateSettingsRequest struct {
Bedrock *BedrockSettingsRequest `json:"bedrock"`
MCPServers map[string]*MCPServerRequest `json:"mcp_servers,omitempty"`
Marketplaces map[string]*MarketplaceRequest `json:"marketplaces,omitempty"`
EnabledPlugins []string `json:"enabled_plugins,omitempty"` // plugin@marketplace format
}
UpdateSettingsRequest is the request body for updating settings
type UserController ¶ added in v1.148.0
type UserController struct{}
UserController handles user-related endpoints
func NewUserController ¶ added in v1.148.0
func NewUserController() *UserController
NewUserController creates a new UserController instance
func (*UserController) GetName ¶ added in v1.148.0
func (c *UserController) GetName() string
GetName returns the name of this controller for logging
func (*UserController) GetUserInfo ¶ added in v1.148.0
func (c *UserController) GetUserInfo(ctx echo.Context) error
GetUserInfo handles GET /user/info requests
type UserInfoResponse ¶ added in v1.148.0
UserInfoResponse represents the response for /user/info endpoint