templates

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package templates implements API functions residing under /provisioning/templates. This path contains methods for querying available VM templates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	List(ctx context.Context, locationID string, templateType TemplateType, page, limit int) ([]Template, error)
}

API contains methods for template querying.

func NewAPI

func NewAPI(c client.Client) API

NewAPI creates a new template API instance with the given client.

type Template

type Template struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	WordSize string `json:"bits"`
	Build    string `json:"build"`
}

Template contains a summary about the state of a template.

type TemplateType

type TemplateType string

TemplateType defines which type of template is selected.

const (
	// TemplateTypeTemplates are templates that already contain a distribution.
	TemplateTypeTemplates TemplateType = "templates"
	// TemplateTypeFromScratch are templates that need to have distribution added to work.
	TemplateTypeFromScratch TemplateType = "from_scratch"
)

Jump to

Keyboard shortcuts

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