monarx

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GroupCmd = &cobra.Command{
	Use:   "monarx",
	Short: "Malware scanner",
	Long:  `Monitor your virtual machines’ security using the Monarx malware scanner. Retrieve scan metrics or install/uninstall the scanner to help protect against malware threats.`,
}
View Source
var InstallCmd = &cobra.Command{
	Use:   "install <virtual machine ID>",
	Short: "Install malware scanner",
	Long: `This endpoint installs the Monarx malware scanner on a specified virtual machine.

Monarx is a security tool designed to detect and prevent malware infections on virtual machines. 
By installing Monarx, users can enhance the security of their virtual machines, ensuring that they are protected against malicious software.`,
	Args: cobra.MatchAll(cobra.ExactArgs(1)),
	Run: func(cmd *cobra.Command, args []string) {
		r, err := api.Request().VPSInstallMonarxV1WithResponse(context.TODO(), utils.StringToInt(args[0]))
		if err != nil {
			log.Fatal(err)
		}

		output.Format(cmd, r.Body, r.StatusCode())
	},
}
View Source
var MetricsCmd = &cobra.Command{
	Use:   "metrics <virtual machine ID>",
	Short: "Get scan metrics",
	Long: `This endpoint retrieves the scan metrics for the Monarx malware scanner installed on a specified virtual machine. 
The scan metrics provide detailed information about the malware scans performed by Monarx, including the number of scans, 
detected threats, and other relevant statistics. 
This information is useful for monitoring the security status of the virtual machine and assessing the effectiveness of the malware scanner.`,
	Args: cobra.MatchAll(cobra.ExactArgs(1)),
	Run: func(cmd *cobra.Command, args []string) {
		r, err := api.Request().VPSGetScanMetricsV1WithResponse(context.TODO(), utils.StringToInt(args[0]))
		if err != nil {
			log.Fatal(err)
		}

		output.Format(cmd, r.Body, r.StatusCode())
	},
}
View Source
var UninstallCmd = &cobra.Command{
	Use:   "uninstall <virtual machine ID>",
	Short: "Uninstall malware scanner",
	Long:  `This endpoint uninstalls the Monarx malware scanner on a specified virtual machine. If Monarx is not installed, the request will still be processed without any effect.`,
	Args:  cobra.MatchAll(cobra.ExactArgs(1)),
	Run: func(cmd *cobra.Command, args []string) {
		r, err := api.Request().VPSUninstallMonarxV1WithResponse(context.TODO(), utils.StringToInt(args[0]))
		if err != nil {
			log.Fatal(err)
		}

		output.Format(cmd, r.Body, r.StatusCode())
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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