Documentation
¶
Overview ¶
pkg/models/swagger.go
Index ¶
- type ArchiveFormat
- type ArchiveInfo
- type ArchiveResponse
- type BuildArtifacts
- type CleanupSummary
- type DatabaseMetrics
- type ErrorResponse
- type FileDistribution
- type FileListResponse
- type FileUploadResponse
- type GenerationJob
- func (j *GenerationJob) AddLog(message string)
- func (j *GenerationJob) BeforeCreate(tx *gorm.DB) error
- func (j *GenerationJob) BeforeUpdate(tx *gorm.DB) error
- func (j *GenerationJob) IsActive() bool
- func (j *GenerationJob) IsTerminal() bool
- func (j *GenerationJob) SetStatus(status JobStatus)
- func (GenerationJob) TableName() string
- func (j *GenerationJob) ToResponse() *JobResponse
- type GenerationRequest
- type HealthResponse
- type InstallPipes
- type JSON
- type JobListResponse
- type JobResponse
- type JobStatus
- type NpmPackageInstallResult
- type PaginationInfo
- type StorageCapacity
- type StorageInfo
- type StorageMetrics
- type StorageUsage
- type StringSlice
- type SuccessResponse
- type SystemMetrics
- type ValidationError
- type WorkerHealthResponse
- type WorkerInfo
- type WorkerMetrics
- type WorkerPerformance
- type WorkerPoolHealth
- type WorkerPoolStats
- type WorkerStats
- type WorkerStatsResponse
- type WorkspaceActivity
- type WorkspaceCleanupBatchResponse
- type WorkspaceCleanupResponse
- type WorkspaceInfo
- type WorkspaceInfoResponse
- type WorkspaceListResponse
- type WorkspaceUsage
- type WorkspacesSummary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchiveFormat ¶ added in v0.0.2
type ArchiveFormat string
ArchiveFormat définit les formats d'archive supportés
const ( FormatZIP ArchiveFormat = "zip" FormatTAR ArchiveFormat = "tar" )
type ArchiveInfo ¶
type ArchiveInfo struct { Filename string `json:"filename" example:"archive-20250117-103000.zip"` Format string `json:"format" example:"zip" enums:"zip,tar"` FilesCount int `json:"files_count" example:"15"` Compressed bool `json:"compressed" example:"true"` SizeBytes int64 `json:"size_bytes" example:"2097152"` SizeMB float64 `json:"size_mb" example:"2.0"` CreationTime string `json:"creation_time" example:"250ms"` } // @name ArchiveInfo
ArchiveInfo contient les informations sur une archive @Description Métadonnées d'une archive créée
type ArchiveResponse ¶
type ArchiveResponse struct { Message string `json:"message" example:"Archive created successfully"` Archive ArchiveInfo `json:"archive"` CreatedAt time.Time `json:"created_at" example:"2025-01-17T10:30:00Z"` DownloadURL string `` /* 126-byte string literal not displayed */ } // @name ArchiveResponse
ArchiveResponse représente la réponse de création d'archive @Description Résultat de la création d'une archive de résultats
type BuildArtifacts ¶
type BuildArtifacts struct { HasDist bool `json:"has_dist" example:"true"` DistCreatedAt time.Time `json:"dist_created_at,omitempty" example:"2025-01-17T10:25:00Z"` IndexHtmlSize int64 `json:"index_html_size,omitempty" example:"15432"` AssetCount int `json:"asset_count,omitempty" example:"8"` BuildSuccess bool `json:"build_success,omitempty" example:"true"` } // @name BuildArtifacts
BuildArtifacts contient les informations sur les artefacts de build @Description Informations sur les fichiers générés par le build
type CleanupSummary ¶
type CleanupSummary struct { TotalWorkspaces int `json:"total_workspaces" example:"50"` EligibleForCleanup int `json:"eligible_for_cleanup" example:"15"` SuccessfullyCleaned int `json:"successfully_cleaned" example:"12"` FailedToClean int `json:"failed_to_clean" example:"3"` MaxAgeHours int `json:"max_age_hours" example:"24"` PerformanceGain string `json:"performance_gain" example:"High"` } // @name CleanupSummary
CleanupSummary contient le résumé du nettoyage @Description Résumé des opérations de nettoyage
type DatabaseMetrics ¶
type DatabaseMetrics struct { Connected bool `json:"connected" example:"true"` TotalJobs int64 `json:"total_jobs" example:"2450"` JobsToday int64 `json:"jobs_today" example:"145"` PendingJobs int `json:"pending_jobs" example:"3"` ProcessingJobs int `json:"processing_jobs" example:"2"` CompletedJobs int64 `json:"completed_jobs" example:"2300"` FailedJobs int64 `json:"failed_jobs" example:"145"` QueryTimeMs float64 `json:"average_query_time_ms" example:"15.2"` ConnectionsUsed int `json:"connections_used" example:"5"` ConnectionsMax int `json:"connections_max" example:"20"` } // @name DatabaseMetrics
DatabaseMetrics contient les métriques de la base de données @Description Métriques de performance de la base de données
type ErrorResponse ¶
type ErrorResponse struct { Error string `json:"error" example:"Validation failed"` Message string `json:"message,omitempty" example:"Detailed error message"` ValidationErrors []ValidationError `json:"validation_errors,omitempty"` Timestamp time.Time `json:"timestamp" example:"2025-01-17T10:30:00Z"` Path string `json:"path,omitempty" example:"/api/v1/generate"` RequestID string `json:"request_id,omitempty" example:"req-123456"` } // @name ErrorResponse
ErrorResponse représente une réponse d'erreur standard @Description Réponse d'erreur standard de l'API
type FileDistribution ¶
type FileDistribution struct { TotalFiles int `json:"total_files" example:"25"` SourceFiles int `json:"source_files" example:"8"` DistFiles int `json:"dist_files,omitempty" example:"12"` ConfigFiles int `json:"config_files" example:"3"` AssetFiles int `json:"asset_files" example:"2"` } // @name FileDistribution
FileDistribution représente la répartition des fichiers @Description Répartition des types de fichiers dans le workspace
type FileListResponse ¶
type FileListResponse struct { JobID string `json:"job_id,omitempty" example:"550e8400-e29b-41d4-a716-446655440001"` CourseID string `json:"course_id,omitempty" example:"550e8400-e29b-41d4-a716-446655440002"` Files []string `json:"files" example:"index.html,assets/style.css,assets/script.js"` Count int `json:"count" example:"3"` } // @name FileListResponse
FileListResponse représente la liste de fichiers @Description Liste de fichiers dans le stockage
type FileUploadResponse ¶
type FileUploadResponse struct { Message string `json:"message" example:"files uploaded successfully"` JobID string `json:"job_id" example:"550e8400-e29b-41d4-a716-446655440001"` Count int `json:"count" example:"3"` Files []string `json:"files,omitempty" example:"slides.md,theme.css,config.json"` } // @name FileUploadResponse
FileUploadResponse représente la réponse d'upload de fichiers @Description Réponse après upload de fichiers
type GenerationJob ¶
type GenerationJob struct { ID uuid.UUID `json:"id" gorm:"type:uuid;primary_key"` CourseID uuid.UUID `json:"course_id" gorm:"type:uuid;not null;index"` Status JobStatus `json:"status" gorm:"type:varchar(20);not null;default:'pending';index"` Progress int `json:"progress" gorm:"default:0;check:progress >= 0 AND progress <= 100"` SourcePath string `json:"source_path" gorm:"type:text;not null"` ResultPath string `json:"result_path" gorm:"type:text"` CallbackURL string `json:"callback_url" gorm:"type:text"` NpmPackages StringSlice `json:"npm_packages" gorm:"type:jsonb;default:'[]'"` Error string `json:"error,omitempty" gorm:"type:text"` Logs StringSlice `json:"logs" gorm:"type:jsonb;default:'[]'"` Metadata JSON `json:"metadata" gorm:"type:jsonb;default:'{}'"` CreatedAt time.Time `json:"created_at" gorm:"index"` UpdatedAt time.Time `json:"updated_at"` StartedAt *time.Time `json:"started_at,omitempty" gorm:"index"` CompletedAt *time.Time `json:"completed_at,omitempty" gorm:"index"` }
GenerationJob est le modèle principal pour la base de données
func (*GenerationJob) AddLog ¶
func (j *GenerationJob) AddLog(message string)
AddLog ajoute un log avec timestamp
func (*GenerationJob) BeforeCreate ¶
func (j *GenerationJob) BeforeCreate(tx *gorm.DB) error
BeforeCreate hook GORM pour initialiser l'ID et les timestamps
func (*GenerationJob) BeforeUpdate ¶
func (j *GenerationJob) BeforeUpdate(tx *gorm.DB) error
BeforeUpdate hook GORM pour mettre à jour le timestamp
func (*GenerationJob) IsActive ¶
func (j *GenerationJob) IsActive() bool
IsActive retourne true si le job est en cours de traitement
func (*GenerationJob) IsTerminal ¶
func (j *GenerationJob) IsTerminal() bool
IsTerminal retourne true si le job est dans un état final
func (*GenerationJob) SetStatus ¶
func (j *GenerationJob) SetStatus(status JobStatus)
SetStatus met à jour le statut avec les timestamps appropriés
func (GenerationJob) TableName ¶
func (GenerationJob) TableName() string
TableName spécifie le nom de la table
func (*GenerationJob) ToResponse ¶
func (j *GenerationJob) ToResponse() *JobResponse
ToResponse convertit un GenerationJob en JobResponse
type GenerationRequest ¶
type GenerationRequest struct { JobID uuid.UUID `json:"job_id" binding:"required"` CourseID uuid.UUID `json:"course_id" binding:"required"` SourcePath string `json:"source_path" binding:"required"` CallbackURL string `json:"callback_url,omitempty"` Packages []string `json:"packages,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` } // @name GenerationRequest
GenerationRequest représente une demande de génération de cours @Description Requête pour créer un nouveau job de génération
type HealthResponse ¶
type HealthResponse struct { Status string `json:"status" example:"healthy" enums:"healthy,degraded,unhealthy"` Service string `json:"service" example:"ocf-worker"` Version string `json:"version" example:"2.0.0"` Timestamp time.Time `json:"timestamp" example:"2025-01-17T10:30:00Z"` Uptime string `json:"uptime,omitempty" example:"24h30m15s"` Environment string `json:"environment,omitempty" example:"development"` } // @name HealthResponse
HealthResponse représente la réponse du health check @Description Statut de santé du service
type InstallPipes ¶ added in v0.0.3
type InstallPipes struct { Stdout io.ReadCloser Stderr io.ReadCloser Stdin io.WriteCloser }
installPipes structure pour gérer les pipes de manière centralisée
type JobListResponse ¶
type JobListResponse struct { Jobs []JobResponse `json:"jobs"` Count int `json:"count" example:"25"` TotalCount int `json:"total_count,omitempty" example:"150"` Page int `json:"page,omitempty" example:"1"` PageSize int `json:"page_size,omitempty" example:"25"` } // @name JobListResponse
JobListResponse représente une liste de jobs @Description Liste paginée de jobs
type JobResponse ¶
type JobResponse struct { ID uuid.UUID `json:"id"` CourseID uuid.UUID `json:"course_id"` Status JobStatus `json:"status"` Progress int `json:"progress"` SourcePath string `json:"source_path"` ResultPath string `json:"result_path,omitempty"` CallbackURL string `json:"callback_url,omitempty"` Error string `json:"error,omitempty"` Logs []string `json:"logs,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` StartedAt *time.Time `json:"started_at,omitempty"` CompletedAt *time.Time `json:"completed_at,omitempty"` } // @name JobResponse
JobResponse représente la réponse contenant les détails d'un job @Description Détails complets d'un job de génération
type NpmPackageInstallResult ¶ added in v0.0.4
type NpmPackageInstallResult struct { Package string `json:"package,omitempty" example:"@slidev/theme-seriph"` Success bool `json:"success" example:"true"` Installed bool `json:"installed" example:"true"` Error string `json:"error,omitempty"` Duration int64 `json:"duration" example:"45"` Logs []string `json:"logs,omitempty"` ExitCode int `json:"exit_code,omitempty" example:"0"` Pipes *InstallPipes `json:"-"` // Non exporté } // @name ThemeInstallResult
NpmPackageInstallResult représente le résultat d'installation d'un paquet @Description Détails du résultat d'installation d'un paquet spécifique
type PaginationInfo ¶
type PaginationInfo struct { Page int `json:"page" example:"1"` PageSize int `json:"page_size" example:"25"` TotalPages int `json:"total_pages" example:"4"` TotalItems int `json:"total_items" example:"95"` HasNext bool `json:"has_next" example:"true"` HasPrevious bool `json:"has_previous" example:"false"` NextPage int `json:"next_page,omitempty" example:"2"` PreviousPage int `json:"previous_page,omitempty"` } // @name PaginationInfo
PaginationInfo représente les informations de pagination @Description Informations de pagination pour les listes
type StorageCapacity ¶
type StorageCapacity struct { Total int64 `json:"total_bytes" example:"1073741824"` // 1GB Used int64 `json:"used_bytes" example:"268435456"` // 256MB Available int64 `json:"available_bytes" example:"805306368"` // 768MB Usage float64 `json:"usage_percent" example:"25.0"` } // @name StorageCapacity
StorageCapacity représente la capacité de stockage @Description Informations sur la capacité de stockage
type StorageInfo ¶
type StorageInfo struct { StorageType string `json:"storage_type" example:"garage" enums:"filesystem,garage"` Endpoints map[string]string `json:"endpoints"` Status string `json:"status" example:"healthy"` Capacity *StorageCapacity `json:"capacity,omitempty"` } // @name StorageInfo
StorageInfo représente les informations du système de stockage @Description Informations sur la configuration du stockage
type StorageMetrics ¶
type StorageMetrics struct { Type string `json:"type" example:"garage" enums:"filesystem,garage"` TotalFiles int64 `json:"total_files" example:"1250"` TotalSizeBytes int64 `json:"total_size_bytes" example:"1073741824"` TotalSizeMB int64 `json:"total_size_mb" example:"1024"` SourceFiles int64 `json:"source_files" example:"800"` ResultFiles int64 `json:"result_files" example:"450"` Healthy bool `json:"healthy" example:"true"` } // @name StorageMetrics
StorageMetrics contient les métriques de stockage @Description Métriques du système de stockage
type StorageUsage ¶
type StorageUsage struct { TotalBytes int64 `json:"total_bytes" example:"52428800"` TotalMB float64 `json:"total_mb" example:"50.0"` SourceBytes int64 `json:"source_bytes" example:"2097152"` SourceMB float64 `json:"source_mb" example:"2.0"` DistBytes int64 `json:"dist_bytes,omitempty" example:"20971520"` DistMB float64 `json:"dist_mb,omitempty" example:"20.0"` OtherBytes int64 `json:"other_bytes" example:"29360128"` OtherMB float64 `json:"other_mb" example:"28.0"` } // @name StorageUsage
StorageUsage représente l'utilisation du stockage @Description Métriques d'utilisation du stockage
type StringSlice ¶
type StringSlice []string
StringSlice type for PostgreSQL JSON arrays
func (*StringSlice) Scan ¶
func (ss *StringSlice) Scan(value interface{}) error
type SuccessResponse ¶
type SuccessResponse struct { Message string `json:"message" example:"Operation completed successfully"` Data interface{} `json:"data,omitempty"` Timestamp time.Time `json:"timestamp" example:"2025-01-17T10:30:00Z"` } // @name SuccessResponse
SuccessResponse représente une réponse de succès générique @Description Réponse de succès standard
type SystemMetrics ¶
type SystemMetrics struct { Timestamp time.Time `json:"timestamp" example:"2025-01-17T10:30:00Z"` Uptime string `json:"uptime" example:"24h30m15s"` Version string `json:"version" example:"2.0.0"` Environment string `json:"environment" example:"production"` Storage StorageMetrics `json:"storage"` Worker WorkerMetrics `json:"worker"` Database DatabaseMetrics `json:"database"` } // @name SystemMetrics
SystemMetrics représente les métriques système globales @Description Métriques système et de performance globales
type ValidationError ¶
type ValidationError struct { Field string `json:"field" example:"job_id"` Value string `json:"value" example:"invalid-uuid"` Message string `json:"message" example:"job ID must be a valid UUID"` Code string `json:"code" example:"INVALID_UUID"` } // @name ValidationError
ValidationError représente une erreur de validation spécifique @Description Détail d'une erreur de validation
type WorkerHealthResponse ¶
type WorkerHealthResponse struct { Status string `json:"status" example:"healthy" enums:"healthy,degraded,unhealthy"` WorkerPool WorkerPoolHealth `json:"worker_pool"` Issues []string `json:"issues,omitempty" example:"1 worker is overloaded"` Timestamp time.Time `json:"timestamp" example:"2025-01-17T10:30:00Z"` Uptime string `json:"uptime" example:"24h30m15s"` } // @name WorkerHealthResponse
WorkerHealthResponse représente l'état de santé du système de workers @Description État de santé détaillé du système de workers
type WorkerInfo ¶
type WorkerInfo struct { ID int `json:"id" example:"1"` Status string `json:"status" example:"busy" enums:"idle,busy,stopped"` CurrentJobID string `json:"current_job_id,omitempty" example:"550e8400-e29b-41d4-a716-446655440001"` JobsTotal int64 `json:"jobs_total" example:"150"` JobsSuccess int64 `json:"jobs_success" example:"145"` JobsFailed int64 `json:"jobs_failed" example:"5"` } // @name WorkerInfo
WorkerInfo représente les informations d'un worker individuel @Description Informations sur un worker spécifique
type WorkerMetrics ¶
type WorkerMetrics struct { TotalWorkers int `json:"total_workers" example:"3"` ActiveWorkers int `json:"active_workers" example:"2"` JobsProcessedToday int64 `json:"jobs_processed_today" example:"145"` JobsPerHour float64 `json:"jobs_per_hour" example:"12.5"` AverageJobTime string `json:"average_job_time" example:"2m15s"` SuccessRate24h float64 `json:"success_rate_24h_percent" example:"96.2"` QueueSize int `json:"queue_size" example:"3"` WorkspaceCount int `json:"workspace_count" example:"15"` } // @name WorkerMetrics
WorkerMetrics contient les métriques des workers @Description Métriques de performance des workers
type WorkerPerformance ¶
type WorkerPerformance struct { JobsPerMinute float64 `json:"jobs_per_minute" example:"12.5"` AverageJobDuration string `json:"average_job_duration" example:"2m15s"` SuccessRate float64 `json:"success_rate_percent" example:"95.2"` TotalJobsProcessed int64 `json:"total_jobs_processed" example:"1250"` TotalJobsSuccessful int64 `json:"total_jobs_successful" example:"1190"` TotalJobsFailed int64 `json:"total_jobs_failed" example:"60"` } // @name WorkerPerformance
WorkerPerformance contient les métriques de performance @Description Métriques de performance globales du pool de workers
type WorkerPoolHealth ¶
type WorkerPoolHealth struct { Running bool `json:"running" example:"true"` WorkerCount int `json:"worker_count" example:"3"` ActiveWorkers int `json:"active_workers" example:"2"` IdleWorkers int `json:"idle_workers" example:"1"` QueueSize int `json:"queue_size" example:"3"` QueueUsage float64 `json:"queue_usage_percent" example:"15.0"` OverloadRisk bool `json:"overload_risk" example:"false"` } // @name WorkerPoolHealth
WorkerPoolHealth contient les métriques de santé du pool @Description Indicateurs de santé du pool de workers
type WorkerPoolStats ¶
type WorkerPoolStats struct { WorkerCount int `json:"worker_count" example:"3"` QueueSize int `json:"queue_size" example:"5"` QueueCapacity int `json:"queue_capacity" example:"20"` QueueUsage float64 `json:"queue_usage_percent" example:"25.0"` Running bool `json:"running" example:"true"` Workers []WorkerInfo `json:"workers"` Performance WorkerPerformance `json:"performance"` } // @name WorkerPoolStats
WorkerPoolStats contient les statistiques du pool de workers @Description Métriques détaillées du pool de workers
type WorkerStats ¶
type WorkerStats struct { WorkerCount int `json:"worker_count" example:"3"` QueueSize int `json:"queue_size" example:"5"` QueueCapacity int `json:"queue_capacity" example:"20"` Running bool `json:"running" example:"true"` Workers []WorkerInfo `json:"workers"` } // @name WorkerStats
WorkerStats représente les statistiques du pool de workers @Description Statistiques détaillées du pool de workers
type WorkerStatsResponse ¶
type WorkerStatsResponse struct { WorkerPool WorkerPoolStats `json:"worker_pool"` Timestamp time.Time `json:"timestamp" example:"2025-01-17T10:30:00Z"` } // @name WorkerStatsResponse
WorkerStatsResponse représente les statistiques détaillées du worker @Description Statistiques complètes du pool de workers et de leurs performances
type WorkspaceActivity ¶
type WorkspaceActivity struct { Status string `json:"status" example:"idle" enums:"active,idle,building,completed,failed"` CreatedAt time.Time `json:"created_at" example:"2025-01-17T10:20:00Z"` LastActivity time.Time `json:"last_activity" example:"2025-01-17T10:25:00Z"` AgeDuration string `json:"age_duration" example:"10m30s"` JobStatus string `json:"job_status,omitempty" example:"completed"` BuildDuration string `json:"build_duration,omitempty" example:"2m15s"` } // @name WorkspaceActivity
WorkspaceActivity contient l'activité du workspace @Description Informations sur l'activité et l'historique du workspace
type WorkspaceCleanupBatchResponse ¶
type WorkspaceCleanupBatchResponse struct { CleanedCount int `json:"cleaned_count" example:"12"` TotalSizeFreed int64 `json:"total_size_freed_bytes" example:"629145600"` TotalSizeFreedMB float64 `json:"total_size_freed_mb" example:"600.0"` TotalFilesRemoved int `json:"total_files_removed" example:"300"` CleanupDuration string `json:"cleanup_duration" example:"5.2s"` Details []WorkspaceCleanupResponse `json:"details,omitempty"` Errors []string `json:"errors,omitempty"` Summary CleanupSummary `json:"summary"` } // @name WorkspaceCleanupBatchResponse
WorkspaceCleanupBatchResponse représente le résultat de nettoyage en lot @Description Résultat du nettoyage automatique des anciens workspaces
type WorkspaceCleanupResponse ¶
type WorkspaceCleanupResponse struct { JobID string `json:"job_id" example:"550e8400-e29b-41d4-a716-446655440001"` Cleaned bool `json:"cleaned" example:"true"` SizeFreed int64 `json:"size_freed_bytes" example:"52428800"` SizeFreedMB float64 `json:"size_freed_mb" example:"50.0"` FilesRemoved int `json:"files_removed" example:"25"` CleanupTime string `json:"cleanup_time" example:"150ms"` Error string `json:"error,omitempty"` } // @name WorkspaceCleanupResponse
WorkspaceCleanupResponse représente le résultat de nettoyage d'un workspace @Description Résultat du nettoyage d'un workspace spécifique
type WorkspaceInfo ¶
type WorkspaceInfo struct { JobID string `json:"job_id" example:"550e8400-e29b-41d4-a716-446655440001"` Path string `json:"path" example:"/app/workspaces/550e8400-e29b-41d4-a716-446655440001"` DistPath string `json:"dist_path" example:"/app/workspaces/550e8400-e29b-41d4-a716-446655440001/dist"` Exists bool `json:"exists" example:"true"` SizeBytes int64 `json:"size_bytes" example:"52428800"` FileCount int `json:"file_count" example:"25"` Files []string `json:"files,omitempty" example:"slides.md,theme.css,package.json"` DistExists bool `json:"dist_exists" example:"true"` DistFileCount int `json:"dist_file_count" example:"12"` DistFiles []string `json:"dist_files,omitempty" example:"index.html,assets/style.css,assets/script.js"` } // @name WorkspaceInfo
WorkspaceInfo structure @Description Informations complètes sur un workspace
type WorkspaceInfoResponse ¶
type WorkspaceInfoResponse struct { Workspace WorkspaceInfo `json:"workspace"` Usage WorkspaceUsage `json:"usage"` Activity WorkspaceActivity `json:"activity"` } // @name WorkspaceInfoResponse
WorkspaceInfoResponse représente les informations détaillées d'un workspace @Description Informations complètes et métriques d'un workspace spécifique
type WorkspaceListResponse ¶
type WorkspaceListResponse struct { Workspaces []WorkspaceInfo `json:"workspaces"` Count int `json:"count" example:"15"` TotalCount int `json:"total_count,omitempty" example:"45"` Page int `json:"page,omitempty" example:"1"` PageSize int `json:"page_size,omitempty" example:"25"` Summary WorkspacesSummary `json:"summary"` } // @name WorkspaceListResponse
WorkspaceListResponse représente la liste des workspaces @Description Liste paginée des workspaces actifs et leurs informations
type WorkspaceUsage ¶
type WorkspaceUsage struct { DiskUsage StorageUsage `json:"disk_usage"` FileDistribution FileDistribution `json:"file_distribution"` BuildArtifacts BuildArtifacts `json:"build_artifacts"` } // @name WorkspaceUsage
WorkspaceUsage contient les métriques d'utilisation @Description Métriques d'utilisation détaillées du workspace
type WorkspacesSummary ¶
type WorkspacesSummary struct { TotalWorkspaces int `json:"total_workspaces" example:"45"` ActiveWorkspaces int `json:"active_workspaces" example:"12"` IdleWorkspaces int `json:"idle_workspaces" example:"33"` TotalSizeBytes int64 `json:"total_size_bytes" example:"1073741824"` TotalSizeMB int `json:"total_size_mb" example:"1024"` AverageFilesPerWS int `json:"average_files_per_workspace" example:"8"` } // @name WorkspacesSummary
WorkspacesSummary contient un résumé des workspaces @Description Statistiques globales des workspaces