gcloud

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentRegion

func CurrentRegion() (string, error)

func DeleteContainerImage

func DeleteContainerImage(image *ContainerImage) error

func ListContainerRepositories

func ListContainerRepositories() ([]string, error)

func ListGKEClustersNames

func ListGKEClustersNames() ([]string, error)

func ListNodePools

func ListNodePools(cluster string) (interface{}, error)

func ListProjectNames

func ListProjectNames() ([]string, error)

func SelectContainerRepositories

func SelectContainerRepositories() ([]string, error)

func SelectTags

func SelectTags() ([]string, error)

func UntagImage

func UntagImage(tag string) error

func UntagImages

func UntagImages(tags []string) error

Types

type AddonsConfig

type AddonsConfig struct {
	KubernetesDashboard KubernetesDashboard `json:"kubernetesDashboard"`
	NetworkPolicyConfig NetworkPolicyConfig `json:"networkPolicyConfig"`
}

type Cluster

type Cluster struct {
	Project                  *Project
	AddonsConfig             AddonsConfig             `json:"addonsConfig"`
	ClusterIpv4Cidr          string                   `json:"clusterIpv4Cidr"`
	CreateTime               time.Time                `json:"createTime"`
	CurrentMasterVersion     string                   `json:"currentMasterVersion"`
	CurrentNodeCount         int                      `json:"currentNodeCount"`
	CurrentNodeVersion       string                   `json:"currentNodeVersion"`
	DatabaseEncryption       DatabaseEncryption       `json:"databaseEncryption"`
	DefaultMaxPodsConstraint DefaultMaxPodsConstraint `json:"defaultMaxPodsConstraint"`
	Endpoint                 string                   `json:"endpoint"`
	InitialClusterVersion    string                   `json:"initialClusterVersion"`
	InstanceGroupUrls        []string                 `json:"instanceGroupUrls"`
	IPAllocationPolicy       IPAllocationPolicy       `json:"ipAllocationPolicy"`
	LabelFingerprint         string                   `json:"labelFingerprint"`
	Location                 string                   `json:"location"`
	Locations                []string                 `json:"locations"`
	LoggingService           string                   `json:"loggingService"`
	MaintenancePolicy        MaintenancePolicy        `json:"maintenancePolicy"`
	MasterAuth               MasterAuth               `json:"masterAuth"`
	MonitoringService        string                   `json:"monitoringService"`
	Name                     string                   `json:"name"`
	Network                  string                   `json:"network"`
	NetworkConfig            NetworkConfig            `json:"networkConfig"`
	NodeConfig               NodeConfig               `json:"nodeConfig"`
	NodePools                []NodePools              `json:"nodePools"`
	SelfLink                 string                   `json:"selfLink"`
	ServicesIpv4Cidr         string                   `json:"servicesIpv4Cidr"`
	Status                   string                   `json:"status"`
	Subnetwork               string                   `json:"subnetwork"`
	Zone                     string                   `json:"zone"`
}

func ListGKEClusters

func ListGKEClusters() ([]*Cluster, error)

func ListGKEClustersByProject

func ListGKEClustersByProject(project *Project) ([]*Cluster, error)

func SelectGKECluster

func SelectGKECluster() (*Cluster, error)

type Config

type Config struct {
	DiskSizeGb             int                    `json:"diskSizeGb"`
	DiskType               string                 `json:"diskType"`
	ImageType              string                 `json:"imageType"`
	MachineType            string                 `json:"machineType"`
	Metadata               Metadata               `json:"metadata"`
	OauthScopes            []string               `json:"oauthScopes"`
	ServiceAccount         string                 `json:"serviceAccount"`
	ShieldedInstanceConfig ShieldedInstanceConfig `json:"shieldedInstanceConfig"`
}

type ContainerImage

type ContainerImage struct {
	Repository           string   `json:"image"`
	Digest               string   `json:"digest"`
	FullyQualifiedDigest string   `json:"fully_qualified_digest"`
	Tags                 []string `json:"tags"`
	Timestamp            struct {
		Datetime    time.Time `json:"-"`
		Day         int       `json:"day"`
		Hour        int       `json:"hour"`
		Microsecond int       `json:"microsecond"`
		Minute      int       `json:"minute"`
		Month       int       `json:"month"`
		Second      int       `json:"second"`
		Year        int       `json:"year"`
	} `json:"timestamp"`
}

func ListContainerImages

func ListContainerImages(repository string) ([]*ContainerImage, error)

func ListContainerImagesWithoutTags

func ListContainerImagesWithoutTags(repository string) ([]*ContainerImage, error)

type DatabaseEncryption

type DatabaseEncryption struct {
	State string `json:"state"`
}

type DefaultMaxPodsConstraint

type DefaultMaxPodsConstraint struct {
	MaxPodsPerNode string `json:"maxPodsPerNode"`
}

type IPAllocationPolicy

type IPAllocationPolicy struct {
	ClusterIpv4Cidr            string `json:"clusterIpv4Cidr"`
	ClusterIpv4CidrBlock       string `json:"clusterIpv4CidrBlock"`
	ClusterSecondaryRangeName  string `json:"clusterSecondaryRangeName"`
	ServicesIpv4Cidr           string `json:"servicesIpv4Cidr"`
	ServicesIpv4CidrBlock      string `json:"servicesIpv4CidrBlock"`
	ServicesSecondaryRangeName string `json:"servicesSecondaryRangeName"`
	UseIPAliases               bool   `json:"useIpAliases"`
}

type KubernetesDashboard

type KubernetesDashboard struct {
	Disabled bool `json:"disabled"`
}

type MaintenancePolicy

type MaintenancePolicy struct {
	ResourceVersion string `json:"resourceVersion"`
}

type Management

type Management struct {
	AutoRepair  bool `json:"autoRepair"`
	AutoUpgrade bool `json:"autoUpgrade"`
}

type MasterAuth

type MasterAuth struct {
	ClusterCaCertificate string `json:"clusterCaCertificate"`
}

type MaxPodsConstraint

type MaxPodsConstraint struct {
	MaxPodsPerNode string `json:"maxPodsPerNode"`
}

type Metadata

type Metadata struct {
	DisableLegacyEndpoints string `json:"disable-legacy-endpoints"`
}

type NetworkConfig

type NetworkConfig struct {
	Network    string `json:"network"`
	Subnetwork string `json:"subnetwork"`
}

type NetworkPolicyConfig

type NetworkPolicyConfig struct {
	Disabled bool `json:"disabled"`
}

type NodeConfig

type NodeConfig struct {
	DiskSizeGb             int                    `json:"diskSizeGb"`
	DiskType               string                 `json:"diskType"`
	ImageType              string                 `json:"imageType"`
	MachineType            string                 `json:"machineType"`
	Metadata               Metadata               `json:"metadata"`
	OauthScopes            []string               `json:"oauthScopes"`
	ServiceAccount         string                 `json:"serviceAccount"`
	ShieldedInstanceConfig ShieldedInstanceConfig `json:"shieldedInstanceConfig"`
}

type NodePools

type NodePools struct {
	Config            Config            `json:"config"`
	InitialNodeCount  int               `json:"initialNodeCount"`
	InstanceGroupUrls []string          `json:"instanceGroupUrls"`
	Locations         []string          `json:"locations"`
	Management        Management        `json:"management"`
	MaxPodsConstraint MaxPodsConstraint `json:"maxPodsConstraint"`
	Name              string            `json:"name"`
	PodIpv4CidrSize   int               `json:"podIpv4CidrSize"`
	SelfLink          string            `json:"selfLink"`
	Status            string            `json:"status"`
	UpgradeSettings   UpgradeSettings   `json:"upgradeSettings"`
	Version           string            `json:"version"`
}

type Project

type Project struct {
	CreateTime     time.Time `json:"createTime"`
	LifecycleState string    `json:"lifecycleState"`
	Name           string    `json:"name"`
	Parent         struct {
		ID   string `json:"id"`
		Type string `json:"type"`
	} `json:"parent"`
	ID     string `json:"projectId"`
	Number string `json:"projectNumber"`
}

func CurrentProject

func CurrentProject() (*Project, error)

func DescribeProject

func DescribeProject(projectId string) (*Project, error)

func ListProjects

func ListProjects() ([]*Project, error)

type ShieldedInstanceConfig

type ShieldedInstanceConfig struct {
	EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring"`
}

type UpgradeSettings

type UpgradeSettings struct {
	MaxSurge int `json:"maxSurge"`
}

Jump to

Keyboard shortcuts

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