gcp

package
v4.1.5+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GoogleComputeAuth = "https://www.googleapis.com/auth/compute"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientProvider

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

func NewClientProvider

func NewClientProvider(gcpBasePath string) *ClientProvider

func (*ClientProvider) Client

func (p *ClientProvider) Client() GCPClient

func (*ClientProvider) SetConfig

func (p *ClientProvider) SetConfig(serviceAccountKey, projectID, region, zone string) error

type GCPClient

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

func (GCPClient) GetNetworks

func (c GCPClient) GetNetworks(name string) (*compute.NetworkList, error)

func (GCPClient) GetProject

func (c GCPClient) GetProject() (*compute.Project, error)

func (GCPClient) GetRegion

func (c GCPClient) GetRegion(region string) (*compute.Region, error)

func (GCPClient) GetZone

func (c GCPClient) GetZone(zone string) (*compute.Zone, error)

func (GCPClient) GetZones

func (c GCPClient) GetZones(region string) ([]string, error)

func (GCPClient) ListInstances

func (c GCPClient) ListInstances() (*compute.InstanceList, error)

func (GCPClient) ProjectID

func (c GCPClient) ProjectID() string

func (GCPClient) SetCommonInstanceMetadata

func (c GCPClient) SetCommonInstanceMetadata(metadata *compute.Metadata) (*compute.Operation, error)

type NetworkInstancesChecker

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

func NewNetworkInstancesChecker

func NewNetworkInstancesChecker(client instanceLister) NetworkInstancesChecker

func (NetworkInstancesChecker) ValidateSafeToDelete

func (n NetworkInstancesChecker) ValidateSafeToDelete(networkName string) error

Jump to

Keyboard shortcuts

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