Documentation ¶
Index ¶
- Constants
- type Client
- type ClientProvider
- type GCPClient
- func (c GCPClient) GetNetworks(name string) (*compute.NetworkList, error)
- func (c GCPClient) GetProject() (*compute.Project, error)
- func (c GCPClient) ListInstances() (*compute.InstanceList, error)
- func (c GCPClient) ProjectID() string
- func (c GCPClient) SetCommonInstanceMetadata(metadata *compute.Metadata) (*compute.Operation, error)
- type KeyPairDeleter
- type KeyPairUpdater
- type NetworkInstancesChecker
- type Zones
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() 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) GetNetworks ¶
func (c GCPClient) GetNetworks(name string) (*compute.NetworkList, error)
func (GCPClient) ListInstances ¶
func (c GCPClient) ListInstances() (*compute.InstanceList, 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
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
Click to show internal directories.
Click to hide internal directories.