Documentation
¶
Index ¶
- func UpdateCustomfields(fields []api.Customfields) api.Update
- func UpdateDescription(desc string) api.Update
- func UpdateName(name string) api.Update
- func UpdateParentGroupID(id string) api.Update
- type Group
- type GroupDefaults
- type Groups
- type HorizontalAutoscalePolicy
- type PoolPolicy
- type Response
- type Service
- func (s *Service) Archive(id string) (*status.Status, error)
- func (s *Service) Create(group Group) (*Response, error)
- func (s *Service) Delete(id string) (*status.Status, error)
- func (s *Service) Get(id string) (*Response, error)
- func (s *Service) Restore(id, intoGroup string) (*status.QueuedResponse, error)
- func (s *Service) SetDefaults(id string, defaults *GroupDefaults) error
- func (s *Service) SetHorizontalAutoscalePolicy(id string, policy *HorizontalAutoscalePolicy) (*interface{}, error)
- func (s *Service) Update(id string, updates ...api.Update) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UpdateCustomfields ¶
func UpdateCustomfields(fields []api.Customfields) api.Update
func UpdateDescription ¶
func UpdateName ¶
func UpdateParentGroupID ¶
Types ¶
type Group ¶
type Group struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
ParentGroupID string `json:"parentGroupId"`
CustomFields []api.Customfields `json:"customFields,omitempty"`
}
request body for creating groups
type GroupDefaults ¶
type GroupDefaults struct {
CPU string `json:"cpu,omitempty"`
MemoryGB string `json:"memoryGB,omitempty"`
NetworkID string `json:"networkId,omitempty"`
PrimaryDns string `json:"primaryDns,omitempty"`
SecondaryDns string `json:"secondaryDns,omitempty"`
TemplateName string `json:"templateName,omitempty"`
}
request body for /v2/groups/ALIAS/ID/defaults
type Groups ¶
type Groups struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Locationid string `json:"locationId"`
Type string `json:"type"`
Status string `json:"status"`
Serverscount int `json:"serversCount"`
Groups []Groups `json:"groups"`
Links api.Links `json:"links"`
}
nested groups under response
type HorizontalAutoscalePolicy ¶
type HorizontalAutoscalePolicy struct {
PolicyId string `json:"policyId,omitempty"`
LoadBalancerPool []PoolPolicy `json:"loadBalancerPool,omitempty"`
}
request body for /v2/groups/ALIAS/ID/horizontalAutoscalePolicy
type PoolPolicy ¶
type Response ¶
type Response struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Locationid string `json:"locationId"`
Type string `json:"type"`
Status string `json:"status"`
Links api.Links `json:"links"`
Groups []Groups `json:"groups"`
Changeinfo struct {
Createddate time.Time `json:"createdDate"`
Createdby string `json:"createdBy"`
Modifieddate time.Time `json:"modifiedDate"`
Modifiedby string `json:"modifiedBy"`
} `json:"changeInfo"`
Customfields []api.Customfields `json:"customFields"`
}
response body for group get
func (*Response) ParentGroupID ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Restore ¶
func (s *Service) Restore(id, intoGroup string) (*status.QueuedResponse, error)
func (*Service) SetDefaults ¶
func (s *Service) SetDefaults(id string, defaults *GroupDefaults) error
func (*Service) SetHorizontalAutoscalePolicy ¶
func (s *Service) SetHorizontalAutoscalePolicy(id string, policy *HorizontalAutoscalePolicy) (*interface{}, error)
Click to show internal directories.
Click to hide internal directories.