services

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: MPL-2.0 Imports: 10 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateGroupInput

type CreateGroupInput struct {
	GroupName  string `json:"group_name"`
	TemplateID string `json:"template_id"`
	Capacity   int    `json:"capacity"`
}

type CreateTemplateInput

type CreateTemplateInput struct {
	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"`
}

type DeleteGroupInput

type DeleteGroupInput struct {
	ID string
}

func (*DeleteGroupInput) Validate

func (i *DeleteGroupInput) Validate() error

type DeleteTemplateInput

type DeleteTemplateInput struct {
	ID string
}

func (*DeleteTemplateInput) Validate

func (i *DeleteTemplateInput) Validate() error

type GetGroupInput

type GetGroupInput struct {
	ID string
}

func (*GetGroupInput) Validate

func (i *GetGroupInput) Validate() error

type GetTemplateInput

type GetTemplateInput struct {
	ID string
}

func (*GetTemplateInput) Validate

func (i *GetTemplateInput) Validate() error

type GroupsClient

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

func (*GroupsClient) Create

func (c *GroupsClient) Create(ctx context.Context, input *CreateGroupInput) (*ServiceGroup, error)

func (*GroupsClient) Delete

func (c *GroupsClient) Delete(ctx context.Context, input *DeleteGroupInput) error

func (*GroupsClient) Get

func (c *GroupsClient) Get(ctx context.Context, input *GetGroupInput) (*ServiceGroup, error)

func (*GroupsClient) List

func (*GroupsClient) ListInstances

func (c *GroupsClient) ListInstances(ctx context.Context, input *ListGroupInstancesInput) ([]*compute.Instance, error)

func (*GroupsClient) Update

func (c *GroupsClient) Update(ctx context.Context, input *UpdateGroupInput) (*ServiceGroup, error)

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"`
}

type ListGroupInstancesInput

type ListGroupInstancesInput struct {
	ID string
}

func (*ListGroupInstancesInput) Validate

func (i *ListGroupInstancesInput) Validate() error

type ListGroupsInput

type ListGroupsInput struct{}

type ListTemplatesInput

type ListTemplatesInput struct{}

type ServiceGroup

type ServiceGroup struct {
	ID         string    `json:"id"`
	GroupName  string    `json:"group_name"`
	TemplateID string    `json:"template_id"`
	Capacity   int       `json:"capacity"`
	CreatedAt  time.Time `json:"created_at"`
	UpdatedAt  time.Time `json:"updated_at"`
}

type ServiceGroupClient

type ServiceGroupClient struct {
	Client *client.Client
}

func NewClient

func NewClient(config *triton.ClientConfig) (*ServiceGroupClient, error)

NewClient returns a new client for working with Service Groups endpoints and resources within TSG

func (*ServiceGroupClient) Groups

func (c *ServiceGroupClient) Groups() *GroupsClient

Groups returns a GroupsClient used for accessing functions pertaining to Service Groups functionality in the TSG API.

func (*ServiceGroupClient) SetHeader

func (c *ServiceGroupClient) SetHeader(header *http.Header)

SetHeaders allows a consumer of the current client to set custom headers for the next backend HTTP request sent to CloudAPI

func (*ServiceGroupClient) Templates

func (c *ServiceGroupClient) Templates() *TemplatesClient

Templates returns a TemplatesClient used for accessing functions pertaining to Instance Templates functionality in the TSG API.

type TemplatesClient

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

func (*TemplatesClient) Create

func (*TemplatesClient) Delete

func (c *TemplatesClient) Delete(ctx context.Context, input *DeleteTemplateInput) error

func (*TemplatesClient) Get

func (*TemplatesClient) List

type UpdateGroupInput

type UpdateGroupInput struct {
	ID         string `json:"id"`
	GroupName  string `json:"group_name"`
	TemplateID string `json:"template_id"`
	Capacity   int    `json:"capacity"`
}

Jump to

Keyboard shortcuts

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