Documentation ¶
Index ¶
- Constants
- type Client
- func (c Client) CheckExists(networkName string) (bool, error)
- func (c Client) GetNetworks(name string) (*compute.NetworkList, error)
- func (c Client) GetRegion(region string) (*compute.Region, error)
- func (c Client) GetZone(zone string) (*compute.Zone, error)
- func (c Client) GetZones(region string) ([]string, error)
- func (c Client) ProjectID() string
- func (c Client) ValidateSafeToDelete(networkName string, envID string) error
- type ClientProvider
- type ComputeClient
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 struct {
// contains filtered or unexported fields
}
func (Client) GetNetworks ¶
func (c Client) GetNetworks(name string) (*compute.NetworkList, 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, region, zone string) error
type ComputeClient ¶
type ComputeClient interface { ListInstances(projectID, zone string) (*compute.InstanceList, error) GetZones(region, projectID string) ([]string, error) GetZone(zone, projectID string) (*compute.Zone, error) GetRegion(region, projectID string) (*compute.Region, error) GetNetworks(name, projectID string) (*compute.NetworkList, error) }
Click to show internal directories.
Click to hide internal directories.