utils

package
v0.7.10 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseRootEndpoint

func BaseRootEndpoint(endpoint string) (string, error)

func MapInterfaceToMapString added in v0.5.12

func MapInterfaceToMapString(mapInterface interface{}) (map[string]string, error)

func NormalizeURLPath

func NormalizeURLPath(endpoint string) (string, error)

NormalizeURLPath removes duplicated slashes

Types

type Version

type Version struct {
	ID       string
	Suffix   string
	Priority int
}

Version is a supported API version, corresponding to a vN package within the appropriate service.

func ChooseVersion

func ChooseVersion(client *gcorecloud.ProviderClient, recognized []*Version) (*Version, string, error)

ChooseVersion queries the base endpoint of an API to choose the most recent non-experimental alternative from a service's published versions. It returns the highest-Priority Version among the alternatives that are provided, as well as its corresponding endpoint.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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