Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseEndpoint ¶
BaseEndpoint will return a URL without the /vX.Y portion of the URL.
func ParseMicroversion ¶
ParseMicroversion parses the version major.minor into separate integers major and minor. For example, "2.53" becomes 2 and 53.
Types ¶
type SupportedMicroversions ¶
func GetSupportedMicroversions ¶
func GetSupportedMicroversions(ctx context.Context, client *gophercloud.ServiceClient) (SupportedMicroversions, error)
GetSupportedMicroversions returns the minimum and maximum microversion that is supported by the ServiceClient Endpoint.
func (SupportedMicroversions) IsSupported ¶
func (supported SupportedMicroversions) IsSupported(version string) (bool, error)
IsSupported checks if a microversion falls in the supported interval. It returns true if the version is within the interval and false otherwise.
type Version ¶
Version is a supported API version, corresponding to a vN package within the appropriate service.
func ChooseVersion ¶
func ChooseVersion(ctx context.Context, client *gophercloud.ProviderClient, recognized []*Version) (*Version, string, error)
ChooseVersion queries the base endpoint of an API to choose the identity service version. It will pick a version among the recognized, taking into account the priority and avoiding experimental alternatives from the published versions. However, if the client specifies a full endpoint that is among the recognized versions, it will be used regardless of priority. It returns the highest-Priority Version, OR exact match with client endpoint, among the alternatives that are provided, as well as its corresponding endpoint.