templates_v1

package
v0.2.11 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckTemplateAllocationByID added in v0.2.7

func CheckTemplateAllocationByID(ctx context.Context, templateID, accountID string) (bool, error)

func CheckTemplateExistsByName added in v0.2.8

func CheckTemplateExistsByName(ctx context.Context, templateName, accountID string) (bool, error)

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) error

func SaveTemplate

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

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