gcp

package
v2.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2016 License: Apache-2.0 Imports: 13 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 Client

type Client interface {
	ProjectID() string
	GetProject() (*compute.Project, error)
	SetCommonInstanceMetadata(metadata *compute.Metadata) (*compute.Operation, error)
	ListInstances() (*compute.InstanceList, error)
}

type ClientProvider

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

func NewClientProvider

func NewClientProvider(gcpBasePath string) *ClientProvider

func (*ClientProvider) Client

func (p *ClientProvider) Client() Client

func (*ClientProvider) SetConfig

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

type GCPClient

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

func (GCPClient) GetProject

func (c GCPClient) GetProject() (*compute.Project, 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 KeyPairDeleter

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

func NewKeyPairDeleter

func NewKeyPairDeleter(clientProvider clientProvider, logger logger) KeyPairDeleter

func (KeyPairDeleter) Delete

func (k KeyPairDeleter) Delete(publicKey string) error

type KeyPairUpdater

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

func NewKeyPairUpdater

func NewKeyPairUpdater(random io.Reader, generateRSAKey rsaKeyGenerator, generateSSHPublicKey sshPublicKeyGenerator, clientProvider clientProvider, logger logger) KeyPairUpdater

func (KeyPairUpdater) Update

func (k KeyPairUpdater) Update() (storage.KeyPair, error)

type NetworkInstancesChecker

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

func NewNetworkInstancesChecker

func NewNetworkInstancesChecker(clientProvider clientProvider) NetworkInstancesChecker

func (NetworkInstancesChecker) ValidateSafeToDelete

func (n NetworkInstancesChecker) ValidateSafeToDelete(networkName string) error

type Zones

type Zones struct{}

func NewZones

func NewZones() Zones

func (Zones) Get

func (Zones) Get(region string) []string

Jump to

Keyboard shortcuts

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