group

package
Version: v0.0.0-...-f62483c Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2016 License: Apache-2.0 Imports: 4 Imported by: 94

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateCustomfields

func UpdateCustomfields(fields []api.Customfields) api.Update

func UpdateDescription

func UpdateDescription(desc string) api.Update

func UpdateName

func UpdateName(name string) api.Update

func UpdateParentGroupID

func UpdateParentGroupID(id string) api.Update

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 PoolPolicy struct {
	ID          string `json:"id,omitempty"`
	PrivatePort int    `json:"privatePort,omitempty"`
	PublicPort  int    `json:"publicPort,omitempty"`
}

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

func (r *Response) ParentGroupID() string

func (*Response) Servers

func (r *Response) Servers() []string

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(client api.HTTP) *Service

func (*Service) Archive

func (s *Service) Archive(id string) (*status.Status, error)

func (*Service) Create

func (s *Service) Create(group Group) (*Response, error)

func (*Service) Delete

func (s *Service) Delete(id string) (*status.Status, error)

func (*Service) Get

func (s *Service) Get(id string) (*Response, error)

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)

func (*Service) Update

func (s *Service) Update(id string, updates ...api.Update) error

Source Files

Jump to

Keyboard shortcuts

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