Documentation
¶
Index ¶
- type AuthController
- type AuthMiddleware
- type CreateSessionRequest
- type CreateSubscriptionRequest
- type GitHubLoginRequest
- type LoginRequest
- type NotificationController
- type RepositoryRequest
- type SendNotificationRequest
- type SessionController
- func (c *SessionController) CreateSession(w http.ResponseWriter, r *http.Request)
- func (c *SessionController) DeleteSession(w http.ResponseWriter, r *http.Request)
- func (c *SessionController) GetSession(w http.ResponseWriter, r *http.Request)
- func (c *SessionController) ListSessions(w http.ResponseWriter, r *http.Request)
- func (c *SessionController) MonitorSession(w http.ResponseWriter, r *http.Request)
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 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 CreateSessionRequest ¶
type CreateSessionRequest struct {
Environment map[string]string `json:"environment"`
Tags map[string]string `json:"tags"`
Repository *RepositoryRequest `json:"repository,omitempty"`
Port *int `json:"port,omitempty"`
}
CreateSessionRequest represents the HTTP request for creating a session
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 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 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 RepositoryRequest ¶
type RepositoryRequest struct {
URL string `json:"url"`
Branch string `json:"branch,omitempty"`
Token string `json:"token,omitempty"`
}
RepositoryRequest represents repository information in HTTP requests
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 HTTP requests for session operations
func NewSessionController ¶
func NewSessionController( createSessionUC *session.CreateSessionUseCase, deleteSessionUC *session.DeleteSessionUseCase, listSessionsUC *session.ListSessionsUseCase, getSessionByIDUC *session.GetSessionByIDUseCase, monitorSessionUC *session.MonitorSessionUseCase, sessionPresenter presenters.SessionPresenter, ) *SessionController
NewSessionController creates a new SessionController
func (*SessionController) CreateSession ¶
func (c *SessionController) CreateSession(w http.ResponseWriter, r *http.Request)
CreateSession handles POST /sessions
func (*SessionController) DeleteSession ¶
func (c *SessionController) DeleteSession(w http.ResponseWriter, r *http.Request)
DeleteSession handles DELETE /sessions/{id}
func (*SessionController) GetSession ¶
func (c *SessionController) GetSession(w http.ResponseWriter, r *http.Request)
GetSession handles GET /sessions/{id}
func (*SessionController) ListSessions ¶
func (c *SessionController) ListSessions(w http.ResponseWriter, r *http.Request)
ListSessions handles GET /sessions
func (*SessionController) MonitorSession ¶
func (c *SessionController) MonitorSession(w http.ResponseWriter, r *http.Request)
MonitorSession handles GET /sessions/{id}/monitor