Documentation
¶
Index ¶
- type APIResponse
- type Client
- func (c *Client) CancelQueueJob(id string) error
- func (c *Client) CheckVPNLeak() (*models.VPNLeakReport, error)
- func (c *Client) ControlContainer(name, action string) error
- func (c *Client) ControlVPN(action string) (any, error)
- func (c *Client) DisablePlugin(name, kind string) error
- func (c *Client) EnablePlugin(name, kind string) error
- func (c *Client) GetAIModels() ([]string, error)
- func (c *Client) GetContainers() ([]models.Container, error)
- func (c *Client) GetLogs(containerID string) (string, error)
- func (c *Client) GetPluginCatalog() ([]models.CatalogItemStatus, error)
- func (c *Client) GetPlugins() (*models.PluginsResponse, error)
- func (c *Client) GetQueue() ([]models.JobRecord, error)
- func (c *Client) GetStacks() ([]models.Stack, error)
- func (c *Client) GetStats() (*models.MetricsResponse, error)
- func (c *Client) GetStatus() (*models.Status, error)
- func (c *Client) GetVPNStatus() (*models.VPNStatus, error)
- func (c *Client) InstallPlugin(name, kind string) error
- func (c *Client) Request(method, path string, body any, target any) error
- func (c *Client) RestartStack(name string) (any, error)
- func (c *Client) StartStack(name string) (any, error)
- func (c *Client) StopStack(name string) (any, error)
- func (c *Client) SwitchVPNRegion(region string) (any, error)
- func (c *Client) SyncVPNPort() (int, error)
- func (c *Client) UninstallPlugin(name, kind string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIResponse ¶
type APIResponse struct {
Status string `json:"status"`
Data json.RawMessage `json:"data"`
Meta json.RawMessage `json:"meta,omitempty"`
Error *models.ErrorResponse `json:"error"`
}
APIResponse represents the standardized JSON structure for M3TAL API responses.
type Client ¶
Client handles authenticated HTTP communications with the M3TAL API.
func (*Client) CancelQueueJob ¶
CancelQueueJob aborts a pending or active job by ID.
func (*Client) CheckVPNLeak ¶
func (c *Client) CheckVPNLeak() (*models.VPNLeakReport, error)
CheckVPNLeak runs leak detection on the host and VPN outbound IPs.
func (*Client) ControlContainer ¶
ControlContainer starts, stops, or restarts a container via the API.
func (*Client) ControlVPN ¶
ControlVPN sends a start, stop, or restart command to the VPN.
func (*Client) DisablePlugin ¶
DisablePlugin disables a plugin by name and kind.
func (*Client) EnablePlugin ¶
EnablePlugin enables a plugin by name and kind.
func (*Client) GetAIModels ¶
GetAIModels returns the list of available AI models from the Ollama backend.
func (*Client) GetContainers ¶
GetContainers returns the list of all active containers.
func (*Client) GetPluginCatalog ¶
func (c *Client) GetPluginCatalog() ([]models.CatalogItemStatus, error)
GetPluginCatalog correlates remote catalog items with local loaded plugins.
func (*Client) GetPlugins ¶
func (c *Client) GetPlugins() (*models.PluginsResponse, error)
GetPlugins returns all loaded plugins across all kinds.
func (*Client) GetStats ¶
func (c *Client) GetStats() (*models.MetricsResponse, error)
GetStats returns the host system metrics response.
func (*Client) GetVPNStatus ¶
GetVPNStatus checks the current status of the VPN connection.
func (*Client) InstallPlugin ¶
InstallPlugin downloads and installs a plugin by name and kind.
func (*Client) RestartStack ¶
RestartStack restarts a stack by name (stops then starts).
func (*Client) StartStack ¶
StartStack deploys a stack by name.
func (*Client) SwitchVPNRegion ¶
SwitchVPNRegion switches the VPN connection region.
func (*Client) SyncVPNPort ¶
SyncVPNPort triggers manual port synchronization for Gluetun.
func (*Client) UninstallPlugin ¶
UninstallPlugin uninstalls a plugin by name and kind.