gce

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	ProjectID   string `json:"project_id"`
	ClientEmail string `json:"client_email"`
	ClientID    string `json:"client_id"`
}

type GCE

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

func NewGCE

func NewGCE(zone string) (*GCE, error)

NewGCE creates a new GCE instance using Application Default Credentials (ADC). Authentication is handled automatically via the standard Google credential chain: 1. GOOGLE_APPLICATION_CREDENTIALS environment variable (path to service account JSON) 2. gcloud CLI authentication (gcloud auth application-default login) 3. GCE metadata service (when running on Google Cloud)

Required environment variables: - GOOGLE_PROJECT: The GCP project ID - GOOGLE_SERVICE_ACCOUNT_EMAIL: The service account email (for OS Login SSH access)

Optional: - GOOGLE_APPLICATION_CREDENTIALS: Path to service account JSON (if not using gcloud CLI auth)

func (*GCE) CreateServer

func (g *GCE) CreateServer(args automation.ServerArgs) (*automation.ResourceResults, error)

func (*GCE) DeleteServer

func (g *GCE) DeleteServer(id string, args automation.ServerArgs) error

func (*GCE) GetServer

func (g *GCE) GetServer(id string, args automation.ServerArgs) (*automation.ResourceResults, error)

func (*GCE) ListServer

func (g *GCE) ListServer() ([]automation.ResourceResults, error)

func (*GCE) UpdateServer

func (g *GCE) UpdateServer(id string, args automation.ServerArgs) error

func (*GCE) UploadPlugin

func (g *GCE) UploadPlugin(id string, args automation.ServerArgs, plugin, destination string) error

Jump to

Keyboard shortcuts

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