This repository has been archived by the owner on Nov 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
templates.go
42 lines (37 loc) · 1.98 KB
/
templates.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package types
import (
"encoding/json"
)
// Template stores blueprint templates
type Template struct {
ID string `json:"id,omitempty" header:"ID"`
Name string `json:"name,omitempty" header:"NAME"`
GenericImageID string `json:"generic_image_id,omitempty" header:"GENERIC IMAGE ID"`
ServiceList []string `json:"service_list,omitempty" header:"SERVICE LIST" show:"nolist"`
ConfigurationAttributes *json.RawMessage `json:"configuration_attributes,omitempty" header:"CONFIGURATION ATTRIBUTES" show:"nolist"`
ResourceType string `json:"resource_type" header:"RESOURCE_TYPE" show:"nolist"`
LabelableFields
}
// TemplateScript stores a templates' script info
type TemplateScript struct {
ID string `json:"id" header:"ID"`
Type string `json:"type" header:"TYPE"`
ExecutionOrder int `json:"execution_order" header:"EXECUTION ORDER"`
TemplateID string `json:"template_id" header:"TEMPLATE ID"`
ScriptID string `json:"script_id" header:"SCRIPT ID"`
ParameterValues *json.RawMessage `json:"parameter_values" header:"PARAMETER VALUES"`
}
// TemplateServer stores servers associated with the template
type TemplateServer struct {
ID string `json:"id" header:"ID"`
Name string `json:"name" header:"NAME"`
Fqdn string `json:"fqdn" header:"FQDN"`
State string `json:"state" header:"STATE"`
PublicIP string `json:"public_ip" header:"PUBLIC IP"`
TemplateID string `json:"template_id" header:"TEMPLATE ID"`
ServerPlanID string `json:"server_plan_id" header:"SERVER PLAN ID"`
SSHProfileID string `json:"ssh_profile_id" header:"SSH PROFILE ID"`
FirewallProfileID string `json:"firewall_profile_id" header:"FIREWALL_PROFILE_ID"`
}
// TemplateScriptCredentials stores credentials to servers
type TemplateScriptCredentials interface{}