templates

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetCmd = &cobra.Command{
	Use:   "get <template ID>",
	Short: "Get template",
	Long:  `This endpoint retrieves details of a specific OS template for virtual machines.`,
	Args:  cobra.MatchAll(cobra.ExactArgs(1)),
	Run: func(cmd *cobra.Command, args []string) {
		r, err := api.Request().VPSGetTemplateV1WithResponse(context.TODO(), utils.StringToInt(args[0]))
		if err != nil {
			log.Fatal(err)
		}

		output.Format(cmd, r.Body, r.StatusCode())
	},
}
View Source
var GroupCmd = &cobra.Command{
	Use:   "templates",
	Short: "OS Templates",
	Long:  `Retrieve details of operating system templates or list all available templates to choose the right configuration when deploying or recreating virtual machines.`,
}
View Source
var ListCmd = &cobra.Command{
	Use:   "list",
	Short: "Get template list",
	Long:  `This endpoint retrieves a list of available OS templates for virtual machines.`,
	Run: func(cmd *cobra.Command, args []string) {
		r, err := api.Request().VPSGetTemplateListV1WithResponse(context.TODO())
		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