utils

package
v0.1.24 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGKEClusterFromDB added in v0.1.2

func GetGKEClusterFromDB(ctx context.Context, name string) (models.GKECluster, error)

GetGKEClusterFromDB returns the models.GKECluster with the given name by looking up the database.

func ProjectFQN

func ProjectFQN(s string) string

ProjectFQN returns the fully-qualified name for the given project id.

func RegionFromZone

func RegionFromZone(zone string) string

RegionFromZone returns the region name from a given zone according to the GCP Naming Convention. If the provided zone name is invalid or empty, the function returns an empty string.

func ResourceNameFromURL

func ResourceNameFromURL(s string) string

ResourceNameFromURL returns the name of a resource from the specified URL.

See Resource Names for more details.

func UnqualifyRegion

func UnqualifyRegion(s string) string

UnqualifyRegion returns the unqualified name for a region.

func UnqualifyZone

func UnqualifyZone(s string) string

UnqualifyZone returns the unqualified name for a zone.

func ZoneFQN

func ZoneFQN(s string) string

ZoneFQN returns the fully-qualified name for the given zone name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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