endpoint

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package endpoint builds Huawei Cloud service endpoint URLs without going through the official SDK's region.ValueOf() lookup.

Every service SDK under huaweicloud-sdk-go-v3/services/<svc>/<ver>/region ships a hardcoded region list. Passing a region the list does not know panics. Several of those lists are incomplete or stale (e.g. missing newer availability zones). We sidestep the panic entirely by using the SDK's WithEndpoint(url) builder option with a URL we construct ourselves.

Huawei Cloud endpoints follow a uniform pattern for service+region combinations:

https://{service}.{region}.myhuaweicloud.com

with a small number of services (bss, iam) historically served from global or partition-specific hosts. Those exceptions are encoded here.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func For

func For(service, region string, intl bool) string

For returns the endpoint URL to pass to WithEndpoint() for the given (service, region) pair. intl toggles between mainland China and international billing partitions for the handful of services where they differ.

Types

This section is empty.

Jump to

Keyboard shortcuts

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