Documentation ¶
Index ¶
- Constants
- type ClientProvider
- type GCPClient
- func (c GCPClient) GetNetworks(name string) (*compute.NetworkList, error)
- func (c GCPClient) GetProject() (*compute.Project, error)
- func (c GCPClient) GetRegion(region string) (*compute.Region, error)
- func (c GCPClient) GetZone(zone string) (*compute.Zone, error)
- func (c GCPClient) GetZones(region string) ([]string, error)
- func (c GCPClient) ListInstances() (*compute.InstanceList, error)
- func (c GCPClient) ProjectID() string
- func (c GCPClient) SetCommonInstanceMetadata(metadata *compute.Metadata) (*compute.Operation, error)
- type NetworkInstancesChecker
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) ListInstances ¶
func (c GCPClient) ListInstances() (*compute.InstanceList, 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
Click to show internal directories.
Click to hide internal directories.