paramhelper

package
v0.0.0-...-110224e Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRegion

func GetRegion(zone string) (string, error)

GetRegion extracts region from a zone

Types

type NetworkResource

type NetworkResource struct {
	Name, Project string
}

NetworkResource contains the name and project of a compute.Network resource.

func SplitNetworkResource

func SplitNetworkResource(originalInput string) (*NetworkResource, error)

SplitNetworkResource creates a NetworkResource instance from a user-provided identifier for a network. It does not validate the individual fields.

func (*NetworkResource) String

func (r *NetworkResource) String() string

String formats the NetworkResource as a GCP-style resource identifier.

type SubnetResource

type SubnetResource struct {
	Name, Project, Region string
}

SubnetResource contains the name, project, and region of a compute.Subnetwork resource.

func SplitSubnetResource

func SplitSubnetResource(originalInput string) (*SubnetResource, error)

SplitSubnetResource creates a SubnetResource instance from a user-provided identifier for a subnet. It does not validate the individual fields.

func (*SubnetResource) String

func (r *SubnetResource) String() string

String formats the SubnetResource as a GCP-style resource identifier.

Jump to

Keyboard shortcuts

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