Documentation
¶
Index ¶
- Variables
- func BroadcastDetachmentEvent(clusterName, status, message string)
- func BroadcastStatusChange(clusterName, status string)
- func CheckKubeStellarStatusHandler(c *gin.Context)
- func CheckPrerequisitesHandler(c *gin.Context)
- func ClearOnboardingEvents(clusterName string)
- func CreateHelmActionConfig(namespace string) (*action.Configuration, error)
- func DeleteDeploymentHandler(c *gin.Context)
- func DeleteMarketplacePluginHandler(c *gin.Context)
- func DeployFromArtifactHub(c *gin.Context)
- func DeployHandler(c *gin.Context)
- func DeploymentStatusHandler(c *gin.Context)
- func DetachCluster(clusterName string) error
- func DetachClusterHandler(c *gin.Context)
- func DisablePluginHandler(c *gin.Context)
- func EnablePluginHandler(c *gin.Context)
- func FetchGitHubYAMLs(repoURL, folderPath, branch, gitUsername, gitToken string) (map[string][]byte, error)
- func GetAllMarketplacePluginsHandler(c *gin.Context)
- func GetAllPluginManifestsHandler(c *gin.Context)
- func GetArtifactHubPackageAdvanceDetails(c *gin.Context)
- func GetArtifactHubPackageInfo(c *gin.Context)
- func GetArtifactHubPackageValues(c *gin.Context)
- func GetClusterStatusHandler(c *gin.Context)
- func GetDetachmentLogsHandler(c *gin.Context)
- func GetGlobalPluginManager() *pkg.PluginManager
- func GetGlobalPluginRegistry() *pkg.PluginRegistry
- func GetLogsHandler(c *gin.Context)
- func GetManagedClusterHandler(c *gin.Context)
- func GetManagedClustersHandler(c *gin.Context)
- func GetMarketplaceFeaturedPluginsHandler(c *gin.Context)
- func GetMarketplacePluginCategoriesHandler(c *gin.Context)
- func GetMarketplacePluginDependenciesHandler(c *gin.Context)
- func GetMarketplacePluginReviewsHandler(c *gin.Context)
- func GetPluginDetailsHandler(c *gin.Context)
- func GetPluginStatusHandler(c *gin.Context)
- func GetPluginSystemConfigHandler(c *gin.Context)
- func GetPluginSystemMetricsHandler(c *gin.Context)
- func GetPodHealthMetrics(c *gin.Context)
- func GetRawMetrics(c *gin.Context)
- func GetSingleMarketplacePluginHandler(c *gin.Context)
- func GitHubWebhookHandler(c *gin.Context)
- func HandleDetachmentWebSocket(c *gin.Context)
- func HandlePluginFile(c *gin.Context, file multipart.File, header *multipart.FileHeader) (string, *os.File, error)
- func HealthCheckHandler(c *gin.Context)
- func InitializeMetrics(logger *zap.Logger, registry prometheus.Gatherer)
- func InstallHandler(c *gin.Context)
- func InstallMarketplacePluginHandler(c *gin.Context)
- func InstallPluginHandler(c *gin.Context)
- func ListArtifactHubRepositories(c *gin.Context)
- func ListDeploymentsHandler(c *gin.Context)
- func ListPluginsHandler(c *gin.Context)
- func LogOnboardingEvent(clusterName, status, message string)
- func LogsWebSocketHandler(c *gin.Context)
- func OnboardCluster(kubeconfigData []byte, clusterName string) error
- func OnboardClusterHandler(c *gin.Context)
- func OnboardingLogsHandler(c *gin.Context)
- func RegisterOnboardingComplete(clusterName string, err error)
- func RegisterOnboardingStart(clusterName string)
- func ReloadPluginHandler(c *gin.Context)
- func SanitizeRepoURL(repoURL string) string
- func SearchArtifactHub(c *gin.Context)
- func SearchArtifactHubAdvance(c *gin.Context)
- func SearchMarketplacePluginsHandler(c *gin.Context)
- func ServePluginFrontendAssets(c *gin.Context)
- func SetGlobalPluginManager(manager *pkg.PluginManager, registry *pkg.PluginRegistry)
- func SetupMetricsRoutes(router *gin.Engine, logger *zap.Logger)
- func SubmitMarketplacePluginFeedbackHandler(c *gin.Context)
- func SubmitPluginFeedbackHandler(c *gin.Context)
- func UninstallPluginHandler(c *gin.Context)
- func UpdateManagedClusterLabels(clientset *kubernetes.Clientset, config *rest.Config, clusterName string, ...) error
- func UpdateManagedClusterLabelsForOnboarding(clientset *kubernetes.Clientset, config *rest.Config, clusterName string, ...) error
- func UpdateManagedClusterLabelsHandler(c *gin.Context)
- func UpdatePluginSystemConfigHandler(c *gin.Context)
- func UploadPluginHandler(c *gin.Context)
- func ValidateClusterConnectivity(kubeconfigData []byte) error
- func ValidateConfigHandler(c *gin.Context)
- func WSHealthHandler(c *gin.Context)
- func WSOnboardingHandler(c *gin.Context)
- type APIError
- type ArtifactHubDeployRequest
- type ArtifactHubPackage
- type ArtifactHubPackageDetails
- type ArtifactHubSearchRequest
- type ArtifactHubSearchResponse
- type Client
- type DeployRequest
- type DeploymentResult
- type DeploymentStatus
- type EnhancedArtifactHubPackageDetails
- type GitHubContentResponse
- type GitHubDirectoryResponse
- type GitHubWebhookPayload
- type InstallationRequest
- type InstallationResponse
- type LabelUpdateResult
- type ManagedClusterCondition
- type ManagedClusterInfo
- type ManagedClusterStatus
- type MetricsConfig
- type OnboardingEvent
- type PluginDetails
- type PluginFeedback
- type PluginManifestWithID
- type PluginSystemConfig
- type PluginSystemMetrics
- type WebSocketClient
- type WebSocketEvent
- type WebhookConfig
- type WindowsInstructions
Constants ¶
This section is empty.
Variables ¶
var ( GlobalPluginManager *pkg.PluginManager GlobalPluginRegistry *pkg.PluginRegistry )
Global plugin manager and registry for dynamic plugin loading
Functions ¶
func BroadcastDetachmentEvent ¶
func BroadcastDetachmentEvent(clusterName, status, message string)
BroadcastDetachmentEvent sends an event to all websocket clients for a specific cluster
func BroadcastStatusChange ¶
func BroadcastStatusChange(clusterName, status string)
BroadcastStatusChange sends a status change event to all websocket clients for a specific cluster
func CheckKubeStellarStatusHandler ¶
CheckKubeStellarStatusHandler checks if KubeStellar is installed and returns status
func CheckPrerequisitesHandler ¶
CheckPrerequisitesHandler checks if all prerequisites are installed
func ClearOnboardingEvents ¶
func ClearOnboardingEvents(clusterName string)
ClearOnboardingEvents clears all events for a specific cluster
func CreateHelmActionConfig ¶
func CreateHelmActionConfig(namespace string) (*action.Configuration, error)
CreateHelmActionConfig initializes the Helm action configuration with better error handling
func DeleteDeploymentHandler ¶
Delete deployment handler
func DeployFromArtifactHub ¶
DeployFromArtifactHub deploys a Helm chart directly from Artifact Hub
func DeployHandler ¶
DeployHandler handles deployment requests with improved error handling and validation
func DeploymentStatusHandler ¶
Deployment status handler to check specific deployment status
func DetachCluster ¶
DetachCluster handles the process of detaching a cluster from the OCM hub
func DetachClusterHandler ¶
DetachClusterHandler handles HTTP requests to detach a cluster
func DisablePluginHandler ¶
DisablePluginHandler disables a plugin
func EnablePluginHandler ¶
EnablePluginHandler enables a plugin
func FetchGitHubYAMLs ¶
func FetchGitHubYAMLs(repoURL, folderPath, branch, gitUsername, gitToken string) (map[string][]byte, error)
FetchGitHubYAMLs fetches YAML files from a GitHub repository directory without cloning Exported function for use in routes and other packages
func GetAllPluginManifestsHandler ¶
GetAllPluginManifestsHandler returns all plugin manifests
func GetArtifactHubPackageAdvanceDetails ¶
GetArtifactHubPackageAdvanceDetails retrieves comprehensive details for a specific package with all metadata
func GetClusterStatusHandler ¶
GetClusterStatusHandler returns the status of all onboarded clusters
func GetDetachmentLogsHandler ¶
GetDetachmentLogsHandler returns all logs for a specific cluster's detachment process
func GetGlobalPluginManager ¶
func GetGlobalPluginManager() *pkg.PluginManager
GetGlobalPluginManager returns the global plugin manager
func GetGlobalPluginRegistry ¶
func GetGlobalPluginRegistry() *pkg.PluginRegistry
GetGlobalPluginRegistry returns the global plugin registry
func GetLogsHandler ¶
GetLogsHandler returns the logs for a specific installation
func GetManagedClusterHandler ¶
GetManagedClusterHandler returns details of a specific managed cluster
func GetManagedClustersHandler ¶
GetManagedClustersHandler returns a list of all managed clusters
func GetPluginDetailsHandler ¶
GetPluginDetailsHandler returns details about a specific plugin
func GetPluginStatusHandler ¶
GetPluginStatusHandler returns the status of a plugin
func GetPluginSystemConfigHandler ¶
GetPluginSystemConfigHandler returns the configuration for the plugin system
func GetPluginSystemMetricsHandler ¶
GetPluginSystemMetricsHandler returns system-wide metrics for plugins
func GetPodHealthMetrics ¶
func GetRawMetrics ¶
GetRawMetrics returns raw Prometheus metrics in text format
func GitHubWebhookHandler ¶
Improved webhook handler with better validation and error handling
func HandleDetachmentWebSocket ¶
HandleDetachmentWebSocket handles websocket connections for detachment logs
func HandlePluginFile ¶
func HealthCheckHandler ¶
Health check handler for monitoring deployment API status
func InitializeMetrics ¶
func InitializeMetrics(logger *zap.Logger, registry prometheus.Gatherer)
InitializeMetrics initializes the metrics API with configuration
func InstallHandler ¶
InstallHandler handles the KubeStellar installation request
func InstallMarketplacePluginHandler ¶
pull the tar.gz from git repo, extract it to plugins/ folder save info to database
func InstallPluginHandler ¶
InstallPluginHandler installs a new plugin
func ListDeploymentsHandler ¶
List all deployments handler
func ListPluginsHandler ¶
ListPluginsHandler returns a list of all available plugins
func LogOnboardingEvent ¶
func LogOnboardingEvent(clusterName, status, message string)
LogOnboardingEvent adds an event to the log and broadcasts it to all connected clients
func LogsWebSocketHandler ¶
LogsWebSocketHandler handles WebSocket connections for real-time logs
func OnboardCluster ¶
OnboardCluster handles the entire process of onboarding a cluster
func OnboardClusterHandler ¶
OnboardClusterHandler handles HTTP requests to onboard a new cluster
func OnboardingLogsHandler ¶
FIXED: OnboardingLogsHandler with proper variable references
func RegisterOnboardingComplete ¶
RegisterOnboardingComplete marks a cluster as finished onboarding and logs the completion event
func RegisterOnboardingStart ¶
func RegisterOnboardingStart(clusterName string)
RegisterOnboardingStart marks a cluster as being onboarded and logs the initial event
func ReloadPluginHandler ¶
ReloadPluginHandler reloads a plugin
func SanitizeRepoURL ¶
SanitizeRepoURL removes credentials from a GitHub repo URL for safe logging or error reporting
func SearchArtifactHub ¶
func SearchArtifactHubAdvance ¶
SearchArtifactHub searches for packages on Artifact Hub with full details
func SearchMarketplacePluginsHandler ¶
handler for search plugins with parameters name, author, description, tags filter by tags/categories, sort by rating, downloads, recent created
func ServePluginFrontendAssets ¶
ServePluginFrontendAssets serves static files from plugin frontend folder
func SetGlobalPluginManager ¶
func SetGlobalPluginManager(manager *pkg.PluginManager, registry *pkg.PluginRegistry)
SetGlobalPluginManager sets the global plugin manager and registry
func SetupMetricsRoutes ¶
SetupMetricsRoutes sets up metrics routes with proper endpoints
func SubmitPluginFeedbackHandler ¶
SubmitPluginFeedbackHandler handles feedback submission for plugins
func UninstallPluginHandler ¶
UninstallPluginHandler uninstalls a plugin completely from the system
func UpdateManagedClusterLabels ¶
func UpdateManagedClusterLabels(clientset *kubernetes.Clientset, config *rest.Config, clusterName string, newLabels map[string]string) error
UpdateManagedClusterLabels - Fixed version for onboarding
func UpdateManagedClusterLabelsForOnboarding ¶
func UpdateManagedClusterLabelsForOnboarding(clientset *kubernetes.Clientset, config *rest.Config, clusterName string, newLabels map[string]string) error
Alternative approach: Create a separate function for onboarding that bypasses protection
func UpdatePluginSystemConfigHandler ¶
UpdatePluginSystemConfigHandler updates the configuration for the plugin system
func UploadPluginHandler ¶
func ValidateClusterConnectivity ¶
ValidateClusterConnectivity checks if the cluster is accessible
func ValidateConfigHandler ¶
Configuration validation handler
func WSHealthHandler ¶
Health check endpoint for WebSocket connections
func WSOnboardingHandler ¶
WSOnboardingHandler handles WebSocket connections for streaming onboarding logs
Types ¶
type APIError ¶
type APIError struct {
Code int `json:"code"`
Message string `json:"message"`
Details string `json:"details,omitempty"`
}
Improved error handling with custom error types
type ArtifactHubDeployRequest ¶
type ArtifactHubDeployRequest struct {
PackageID string `json:"packageId"` // Format: repo/org/chartname
Version string `json:"version"` // Specific version to deploy
Namespace string `json:"namespace"` // Target namespace
ReleaseName string `json:"releaseName"` // Helm release name
Values map[string]string `json:"values"` // Custom values
ConfigMaps []k8s.ConfigMapRef `json:"configMaps"` // ConfigMap references
WorkloadLabel string `json:"workloadLabel"` // KubeStellar workload label
}
ArtifactHubDeployRequest represents the request payload for deploying from Artifact Hub
type ArtifactHubPackage ¶
type ArtifactHubPackage struct {
PackageID string `json:"package_id"`
Name string `json:"name"`
NormalizedName string `json:"normalized_name"`
LogoImageID string `json:"logo_image_id"`
LogoURL string `json:"logo_url"`
Stars int `json:"stars"`
Official bool `json:"official"`
VerifiedPublisher bool `json:"verified_publisher"`
Repository struct {
URL string `json:"url"`
Name string `json:"name"`
DisplayName string `json:"display_name"`
Kind int `json:"kind"`
VerifiedPublisher bool `json:"verified_publisher"`
Official bool `json:"official"`
OrganizationName string `json:"organization_name"`
OrganizationDisplayName string `json:"organization_display_name"`
} `json:"repository"`
Version string `json:"version"`
AppVersion string `json:"app_version"`
Description string `json:"description"`
Keywords []string `json:"keywords"`
License string `json:"license"`
Deprecated bool `json:"deprecated"`
Signed bool `json:"signed"`
SecurityReport struct {
Summary struct {
Critical int `json:"critical"`
High int `json:"high"`
Medium int `json:"medium"`
Low int `json:"low"`
Unknown int `json:"unknown"`
} `json:"summary"`
} `json:"security_report"`
ContainersImages []struct {
Name string `json:"name"`
Image string `json:"image"`
} `json:"containers_images"`
TS int64 `json:"ts"`
CreatedAt int64 `json:"created_at"`
Links []struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"links"`
Maintainers []struct {
Name string `json:"name"`
Email string `json:"email"`
} `json:"maintainers"`
HomeURL string `json:"home_url"`
ContentURL string `json:"content_url"`
InstallURL string `json:"install_url"`
}
First, let's define a simplified package struct for the helper functions
type ArtifactHubPackageDetails ¶
type ArtifactHubPackageDetails struct {
Name string `json:"name"`
Version string `json:"version"`
AppVersion string `json:"app_version"`
Description string `json:"description"`
Repository struct {
URL string `json:"url"`
Name string `json:"name"`
} `json:"repository"`
DefaultValues string `json:"default_values"`
}
ArtifactHubPackageDetails represents detailed package information from Artifact Hub API
type ArtifactHubSearchRequest ¶
type ArtifactHubSearchRequest struct {
Query string `json:"query"`
Kind string `json:"kind"` // helm, krew, falco, opa, etc.
Offset int `json:"offset"`
Limit int `json:"limit"`
}
ArtifactHubSearchRequest represents search parameters for Artifact Hub
type ArtifactHubSearchResponse ¶
type ArtifactHubSearchResponse struct {
Packages []ArtifactHubPackage `json:"packages"`
}
Updated ArtifactHubSearchResponse using the package struct
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a WebSocket client with context for cancellation
type DeployRequest ¶
type DeploymentResult ¶
type DeploymentResult struct {
ID string
Tree interface{}
}
type DeploymentStatus ¶
type DeploymentStatus struct {
Success bool `json:"success"`
Message string `json:"message"`
Error string `json:"error,omitempty"`
}
DeploymentStatus represents the status of a deployment
type EnhancedArtifactHubPackageDetails ¶
type EnhancedArtifactHubPackageDetails struct {
PackageID string `json:"package_id"`
Name string `json:"name"`
NormalizedName string `json:"normalized_name"`
LogoImageID string `json:"logo_image_id"`
LogoURL string `json:"logo_url"`
Stars int `json:"stars"`
Version string `json:"version"`
AppVersion string `json:"app_version"`
Description string `json:"description"`
Keywords []string `json:"keywords"`
HomeURL string `json:"home_url"`
ReadmeURL string `json:"readme_url"`
License string `json:"license"`
Deprecated bool `json:"deprecated"`
Signed bool `json:"signed"`
CreatedAt int64 `json:"created_at"`
Digest string `json:"digest"`
InstallURL string `json:"install"`
ValueSchemaURL string `json:"values_schema_url"`
ContentURL string `json:"content_url"`
Repository struct {
URL string `json:"url"`
Name string `json:"name"`
DisplayName string `json:"display_name"`
Kind int `json:"kind"`
VerifiedPublisher bool `json:"verified_publisher"`
Official bool `json:"official"`
OrganizationName string `json:"organization_name"`
OrganizationDisplayName string `json:"organization_display_name"`
} `json:"repository"`
Links []struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"links"`
Maintainers []struct {
Name string `json:"name"`
Email string `json:"email"`
} `json:"maintainers"`
ContainersImages []struct {
Name string `json:"name"`
Image string `json:"image"`
Whitelisted bool `json:"whitelisted"`
} `json:"containers_images"`
SecurityReport struct {
Summary struct {
Critical int `json:"critical"`
High int `json:"high"`
Medium int `json:"medium"`
Low int `json:"low"`
Unknown int `json:"unknown"`
} `json:"summary"`
Full map[string]interface{} `json:"full"`
} `json:"security_report"`
Recommendations []struct {
URL string `json:"url"`
} `json:"recommendations"`
Screenshots []struct {
Title string `json:"title"`
URL string `json:"url"`
} `json:"screenshots"`
ChangeLog []struct {
Version string `json:"version"`
TS int64 `json:"ts"`
Changes []string `json:"changes"`
ContainsSecurityUpdates bool `json:"contains_security_updates"`
Prerelease bool `json:"prerelease"`
} `json:"change_log"`
DefaultValues string `json:"default_values"`
ValuesSchema interface{} `json:"values_schema"`
Stats struct {
Subscriptions int `json:"subscriptions"`
Webhooks int `json:"webhooks"`
} `json:"stats"`
}
EnhancedArtifactHubPackageDetails with all available details
type GitHubContentResponse ¶
type GitHubContentResponse struct {
Type string `json:"type"`
Encoding string `json:"encoding"`
Size int `json:"size"`
Name string `json:"name"`
Path string `json:"path"`
Content string `json:"content"`
SHA string `json:"sha"`
URL string `json:"url"`
DownloadURL string `json:"download_url"`
}
GitHubContentResponse represents the GitHub API response for a file's content
type GitHubDirectoryResponse ¶
type GitHubDirectoryResponse []struct {
Name string `json:"name"`
Path string `json:"path"`
SHA string `json:"sha"`
Size int `json:"size"`
URL string `json:"url"`
HTMLURL string `json:"html_url"`
GitURL string `json:"git_url"`
DownloadURL string `json:"download_url"`
Type string `json:"type"`
}
GitHubDirectoryResponse represents a GitHub API response for directory listing
type GitHubWebhookPayload ¶
type GitHubWebhookPayload struct {
Repository struct {
CloneURL string `json:"clone_url"`
FullName string `json:"full_name"`
} `json:"repository"`
Ref string `json:"ref"` // Format: "refs/heads/main"
Commits []struct {
ID string `json:"id"`
Message string `json:"message"`
URL string `json:"url"`
Modified []string `json:"modified"`
Added []string `json:"added"`
Removed []string `json:"removed"`
} `json:"commits"`
HeadCommit struct {
ID string `json:"id"`
Message string `json:"message"`
URL string `json:"url"`
} `json:"head_commit"`
}
GitHubWebhookPayload defines the expected structure of the webhook request
type InstallationRequest ¶
type InstallationRequest struct {
Platform string `json:"platform"` // kind or k3d
}
InstallationRequest represents the installation request parameters
type InstallationResponse ¶
type InstallationResponse struct {
Success bool `json:"success"`
InstallID string `json:"installId,omitempty"`
Environment map[string]string `json:"environment,omitempty"`
ErrorMessage string `json:"errorMessage,omitempty"`
Windows *WindowsInstructions `json:"windows,omitempty"`
}
InstallationResponse represents the response after installation request
type LabelUpdateResult ¶
type LabelUpdateResult struct {
Added []string `json:"added"`
Modified []string `json:"modified"`
Deleted []string `json:"deleted"`
Protected []string `json:"protected"`
}
LabelUpdateResult holds the result of label operations
type ManagedClusterCondition ¶
type ManagedClusterCondition struct {
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
Message string `json:"message,omitempty"`
Reason string `json:"reason,omitempty"`
Status string `json:"status,omitempty"`
Type string `json:"type,omitempty"`
}
ManagedClusterCondition represents a condition of a managed cluster
type ManagedClusterInfo ¶
type ManagedClusterInfo struct {
Name string `json:"name"`
UID string `json:"uid"`
CreationTimestamp time.Time `json:"creationTimestamp"`
Labels map[string]string `json:"labels,omitempty"`
Status ManagedClusterStatus `json:"status,omitempty"`
Available bool `json:"available"`
Joined bool `json:"joined"`
}
ManagedClusterInfo contains key information about a managed cluster
type ManagedClusterStatus ¶
type ManagedClusterStatus struct {
Conditions []ManagedClusterCondition `json:"conditions,omitempty"`
Version map[string]string `json:"version,omitempty"`
Capacity map[string]string `json:"capacity,omitempty"`
}
ManagedClusterStatus represents the status of a managed cluster
type MetricsConfig ¶
type MetricsConfig struct {
Registry prometheus.Gatherer
Logger *zap.Logger
EnableFilter bool
DefaultHost string
DefaultPort string
}
MetricsConfig holds configuration for metrics API
type OnboardingEvent ¶
type OnboardingEvent struct {
ClusterName string `json:"clusterName"`
Status string `json:"status"`
Message string `json:"message"`
Timestamp time.Time `json:"timestamp"`
}
OnboardingEvent represents a single event in the onboarding process
func GetOnboardingEvents ¶
func GetOnboardingEvents(clusterName string) []OnboardingEvent
GetOnboardingEvents returns all events for a specific cluster
type PluginDetails ¶
type PluginDetails struct {
ID int `json:"id"`
Name string `json:"name"`
Version string `json:"version"`
Enabled bool `json:"enabled"`
Description string `json:"description,omitempty"`
Author string `json:"author,omitempty"`
CreatedAt time.Time `json:"createdAt,omitempty"`
UpdatedAt time.Time `json:"updatedAt,omitempty"`
Routes []string `json:"routes,omitempty"`
Status string `json:"status"`
}
PluginDetails represents the detailed information of a plugin
type PluginFeedback ¶
type PluginFeedback struct {
PluginID int `json:"pluginId"`
Rating int `json:"rating" binding:"required,min=0,max=5"`
Comment string `json:"comment"`
Suggestions string `json:"suggestions"`
UserID int `json:"userId,omitempty"`
UserEmail string `json:"userEmail,omitempty"`
CreatedAt time.Time `json:"createdAt"`
}
PluginFeedback represents user feedback for a plugin
type PluginManifestWithID ¶
type PluginManifestWithID struct {
ID int `json:"id"`
Manifest *pkg.PluginManifest `json:"manifest"`
}
type PluginSystemConfig ¶
type PluginSystemConfig struct {
PluginsDirectory string `json:"pluginsDirectory"`
AutoloadPlugins bool `json:"autoloadPlugins"`
PluginTimeout int `json:"pluginTimeout"`
MaxConcurrentCalls int `json:"maxConcurrentCalls"`
LogLevel string `json:"logLevel"`
}
PluginSystemConfig represents the configuration for the plugin system
type PluginSystemMetrics ¶
type PluginSystemMetrics struct {
TotalPlugins int `json:"totalPlugins"`
EnabledPlugins int `json:"enabledPlugins"`
DisabledPlugins int `json:"disabledPlugins"`
SystemLoad float64 `json:"systemLoad,omitempty"`
MemoryUsage string `json:"memoryUsage,omitempty"`
LastUpdated time.Time `json:"lastUpdated"`
PluginsDirectory string `json:"pluginsDirectory"`
}
PluginSystemMetrics contains system-wide metrics for plugins
type WebSocketClient ¶
type WebSocketEvent ¶
type WebSocketEvent struct {
Type string `json:"type"`
ClusterName string `json:"clusterName"`
Status string `json:"status"`
Message string `json:"message"`
Timestamp time.Time `json:"timestamp"`
}
WebSocketEvent represents an event to be sent over the websocket
type WebhookConfig ¶
Configuration struct for webhook handling