compute

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Scopes = []string{
	"https://www.googleapis.com/auth/cloud-platform",
	"https://www.googleapis.com/auth/compute",
	"https://www.googleapis.com/auth/compute.readonly",
	"https://www.googleapis.com/auth/devstorage.full_control",
	"https://www.googleapis.com/auth/devstorage.read_only",
	"https://www.googleapis.com/auth/devstorage.read_write",
}

Functions

This section is empty.

Types

type Client

type Client struct {
	Client     *compute.Service
	Credential *google.Credentials
}

func NewClient

func NewClient(jsonCred string) (c *Client, err error)

func (*Client) LoadAllInstances

func (c *Client) LoadAllInstances(zone, filter string) (instances *Instances, err error)

func (*Client) LoadInstanceByName

func (c *Client) LoadInstanceByName(zone, name string) (instance *Instance, err error)

func (*Client) LoadInstancesByZone

func (c *Client) LoadInstancesByZone(zone, filter string) (instances *Instances, err error)

type Instance

type Instance struct {
	Instance *compute.Instance
}

func (*Instance) GetOutput

func (i *Instance) GetOutput() (out string)

func (*Instance) GetStatus

func (i *Instance) GetStatus() int

type Instances

type Instances struct {
	Instances []*Instance
}

func (Instances) GetOutput

func (i Instances) GetOutput() (output string)

func (*Instances) GetStatus

func (i *Instances) GetStatus() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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