templates_v1

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2018 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(w http.ResponseWriter, r *http.Request)

func Delete

func Delete(w http.ResponseWriter, r *http.Request)

func Get

func Get(w http.ResponseWriter, r *http.Request)

func List

func List(w http.ResponseWriter, r *http.Request)

func RemoveTemplate

func RemoveTemplate(ctx context.Context, identifier string, accountID string)

func SaveTemplate

func SaveTemplate(ctx context.Context, accountID string, template *InstanceTemplate)

Types

type InstanceTemplate

type InstanceTemplate struct {
	ID              string            `json:"id"`
	TemplateName    string            `json:"template_name"`
	Package         string            `json:"package"`
	ImageID         string            `json:"image_id"`
	FirewallEnabled bool              `json:"firewall_enabled"`
	Networks        []string          `json:"networks"`
	UserData        string            `json:"userdata"`
	MetaData        map[string]string `json:"metadata"`
	Tags            map[string]string `json:"tags"`
	CreatedAt       time.Time         `json:"created_at"`
}

func FindTemplateByID

func FindTemplateByID(ctx context.Context, key string, accountID string) (*InstanceTemplate, bool)

func FindTemplateByName

func FindTemplateByName(ctx context.Context, key string, accountID string) (*InstanceTemplate, bool)

func FindTemplates

func FindTemplates(ctx context.Context, accountID string) ([]*InstanceTemplate, error)

func (*InstanceTemplate) ShortID

func (t *InstanceTemplate) ShortID() string

Jump to

Keyboard shortcuts

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