api

package
v0.0.0-...-ea9d409 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 53 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func CheckKubeStellarStatusHandler(c *gin.Context)

CheckKubeStellarStatusHandler checks if KubeStellar is installed and returns status

func CheckPrerequisitesHandler

func CheckPrerequisitesHandler(c *gin.Context)

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

func DeleteDeploymentHandler(c *gin.Context)

Delete deployment handler

func DeleteMarketplacePluginHandler

func DeleteMarketplacePluginHandler(c *gin.Context)

func DeployFromArtifactHub

func DeployFromArtifactHub(c *gin.Context)

DeployFromArtifactHub deploys a Helm chart directly from Artifact Hub

func DeployHandler

func DeployHandler(c *gin.Context)

DeployHandler handles deployment requests with improved error handling and validation

func DeploymentStatusHandler

func DeploymentStatusHandler(c *gin.Context)

Deployment status handler to check specific deployment status

func DetachCluster

func DetachCluster(clusterName string) error

DetachCluster handles the process of detaching a cluster from the OCM hub

func DetachClusterHandler

func DetachClusterHandler(c *gin.Context)

DetachClusterHandler handles HTTP requests to detach a cluster

func DisablePluginHandler

func DisablePluginHandler(c *gin.Context)

DisablePluginHandler disables a plugin

func EnablePluginHandler

func EnablePluginHandler(c *gin.Context)

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 GetAllMarketplacePluginsHandler

func GetAllMarketplacePluginsHandler(c *gin.Context)

func GetAllPluginManifestsHandler

func GetAllPluginManifestsHandler(c *gin.Context)

GetAllPluginManifestsHandler returns all plugin manifests

func GetArtifactHubPackageAdvanceDetails

func GetArtifactHubPackageAdvanceDetails(c *gin.Context)

GetArtifactHubPackageAdvanceDetails retrieves comprehensive details for a specific package with all metadata

func GetArtifactHubPackageInfo

func GetArtifactHubPackageInfo(c *gin.Context)

func GetArtifactHubPackageValues

func GetArtifactHubPackageValues(c *gin.Context)

func GetClusterStatusHandler

func GetClusterStatusHandler(c *gin.Context)

GetClusterStatusHandler returns the status of all onboarded clusters

func GetDetachmentLogsHandler

func GetDetachmentLogsHandler(c *gin.Context)

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

func GetLogsHandler(c *gin.Context)

GetLogsHandler returns the logs for a specific installation

func GetManagedClusterHandler

func GetManagedClusterHandler(c *gin.Context)

GetManagedClusterHandler returns details of a specific managed cluster

func GetManagedClustersHandler

func GetManagedClustersHandler(c *gin.Context)

GetManagedClustersHandler returns a list of all managed clusters

func GetMarketplaceFeaturedPluginsHandler

func GetMarketplaceFeaturedPluginsHandler(c *gin.Context)

func GetMarketplacePluginCategoriesHandler

func GetMarketplacePluginCategoriesHandler(c *gin.Context)

func GetMarketplacePluginDependenciesHandler

func GetMarketplacePluginDependenciesHandler(c *gin.Context)

func GetMarketplacePluginReviewsHandler

func GetMarketplacePluginReviewsHandler(c *gin.Context)

func GetPluginDetailsHandler

func GetPluginDetailsHandler(c *gin.Context)

GetPluginDetailsHandler returns details about a specific plugin

func GetPluginStatusHandler

func GetPluginStatusHandler(c *gin.Context)

GetPluginStatusHandler returns the status of a plugin

func GetPluginSystemConfigHandler

func GetPluginSystemConfigHandler(c *gin.Context)

GetPluginSystemConfigHandler returns the configuration for the plugin system

func GetPluginSystemMetricsHandler

func GetPluginSystemMetricsHandler(c *gin.Context)

GetPluginSystemMetricsHandler returns system-wide metrics for plugins

func GetPodHealthMetrics

func GetPodHealthMetrics(c *gin.Context)

func GetRawMetrics

func GetRawMetrics(c *gin.Context)

GetRawMetrics returns raw Prometheus metrics in text format

func GetSingleMarketplacePluginHandler

func GetSingleMarketplacePluginHandler(c *gin.Context)

func GitHubWebhookHandler

func GitHubWebhookHandler(c *gin.Context)

Improved webhook handler with better validation and error handling

func HandleDetachmentWebSocket

func HandleDetachmentWebSocket(c *gin.Context)

HandleDetachmentWebSocket handles websocket connections for detachment logs

func HandlePluginFile

func HandlePluginFile(c *gin.Context, file multipart.File, header *multipart.FileHeader) (string, *os.File, error)

func HealthCheckHandler

func HealthCheckHandler(c *gin.Context)

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

func InstallHandler(c *gin.Context)

InstallHandler handles the KubeStellar installation request

func InstallMarketplacePluginHandler

func InstallMarketplacePluginHandler(c *gin.Context)

pull the tar.gz from git repo, extract it to plugins/ folder save info to database

func InstallPluginHandler

func InstallPluginHandler(c *gin.Context)

InstallPluginHandler installs a new plugin

func ListArtifactHubRepositories

func ListArtifactHubRepositories(c *gin.Context)

func ListDeploymentsHandler

func ListDeploymentsHandler(c *gin.Context)

List all deployments handler

func ListPluginsHandler

func ListPluginsHandler(c *gin.Context)

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

func LogsWebSocketHandler(c *gin.Context)

LogsWebSocketHandler handles WebSocket connections for real-time logs

func OnboardCluster

func OnboardCluster(kubeconfigData []byte, clusterName string) error

OnboardCluster handles the entire process of onboarding a cluster

func OnboardClusterHandler

func OnboardClusterHandler(c *gin.Context)

OnboardClusterHandler handles HTTP requests to onboard a new cluster

func OnboardingLogsHandler

func OnboardingLogsHandler(c *gin.Context)

FIXED: OnboardingLogsHandler with proper variable references

func RegisterOnboardingComplete

func RegisterOnboardingComplete(clusterName string, err error)

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

func ReloadPluginHandler(c *gin.Context)

ReloadPluginHandler reloads a plugin

func SanitizeRepoURL

func SanitizeRepoURL(repoURL string) string

SanitizeRepoURL removes credentials from a GitHub repo URL for safe logging or error reporting

func SearchArtifactHub

func SearchArtifactHub(c *gin.Context)

func SearchArtifactHubAdvance

func SearchArtifactHubAdvance(c *gin.Context)

SearchArtifactHub searches for packages on Artifact Hub with full details

func SearchMarketplacePluginsHandler

func SearchMarketplacePluginsHandler(c *gin.Context)

handler for search plugins with parameters name, author, description, tags filter by tags/categories, sort by rating, downloads, recent created

func ServePluginFrontendAssets

func ServePluginFrontendAssets(c *gin.Context)

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

func SetupMetricsRoutes(router *gin.Engine, logger *zap.Logger)

SetupMetricsRoutes sets up metrics routes with proper endpoints

func SubmitMarketplacePluginFeedbackHandler

func SubmitMarketplacePluginFeedbackHandler(c *gin.Context)

func SubmitPluginFeedbackHandler

func SubmitPluginFeedbackHandler(c *gin.Context)

SubmitPluginFeedbackHandler handles feedback submission for plugins

func UninstallPluginHandler

func UninstallPluginHandler(c *gin.Context)

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 UpdateManagedClusterLabelsHandler

func UpdateManagedClusterLabelsHandler(c *gin.Context)

func UpdatePluginSystemConfigHandler

func UpdatePluginSystemConfigHandler(c *gin.Context)

UpdatePluginSystemConfigHandler updates the configuration for the plugin system

func UploadPluginHandler

func UploadPluginHandler(c *gin.Context)

func ValidateClusterConnectivity

func ValidateClusterConnectivity(kubeconfigData []byte) error

ValidateClusterConnectivity checks if the cluster is accessible

func ValidateConfigHandler

func ValidateConfigHandler(c *gin.Context)

Configuration validation handler

func WSHealthHandler

func WSHealthHandler(c *gin.Context)

Health check endpoint for WebSocket connections

func WSOnboardingHandler

func WSOnboardingHandler(c *gin.Context)

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

func (*APIError) Error

func (e *APIError) Error() string

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 DeployRequest struct {
	RepoURL       string `json:"repo_url" binding:"required"`
	FolderPath    string `json:"folder_path"`
	WorkloadLabel string `json:"workload_label"`
}

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 WebSocketClient struct {
	Conn      *websocket.Conn
	ClusterID string
}

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

type WebhookConfig struct {
	FolderPath    string
	Branch        string
	WorkloadLabel string
	GitToken      string
}

Configuration struct for webhook handling

type WindowsInstructions

type WindowsInstructions struct {
	Steps       []string          `json:"steps"`
	Commands    []string          `json:"commands"`
	Links       map[string]string `json:"links"`
	Environment map[string]string `json:"environment"`
}

WindowsInstructions represents instructions for Windows users

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL