googleurl

package
v0.0.35 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 3 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Link struct {
	// Service is the service name e.g. container.googleapis.com
	Service string
	// Version is the version in the link
	Version string

	// Project is the GCP project ID in the link
	Project string

	// Zone is the GCP zone found in the link
	Zone string

	// Location is the GCP location (region or zone) found in the link
	Location string

	// Extra holds any additional named fields found in the link
	Extra map[string]string
}

Link holds the results of parsing a google selfLink URL.

func Parse

func Parse(selfLink string) (*Link, error)

Parse parses the selfLink into fields in a Link object. A selfLink is expected to have a version as the first path token, otherwise use ParseUnversioned.

func ParseUnversioned

func ParseUnversioned(selfLink string) (*Link, error)

ParseUnversioned parses the unversioned selfLink into fields in a Link object. An unversioned reference differs from a normal selfLink in that it doesn't have a version, for example "//container.googleapis.com/projects/example-project/locations/us-central1/clusters/example-cluster"

Jump to

Keyboard shortcuts

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