Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // IBMResourceCRNRegexp is a regular expression of IBM resource CRNs // See: https://cloud.ibm.com/docs/account?topic=account-crn IBMResourceCRNRegexp = regexp.MustCompile(`^crn:v[0-9]:(?P<cloudName>[^:]*):(?P<cloudType>[^:]*):(?P<serviceName>[^:]*):(?P<location>[^:]*):(?P<scope>[^:]*):(?P<guid>[^:]*):(?P<resourceType>[^:]*):(?P<resourceID>[^:]*)$`) )
Functions ¶
Types ¶
type Config ¶
type Config struct { // APIKey is the IBM Cloud API key that the provider will use. APIKey string // InstanceID is GUID in case of dns svcs and CRN in case of cis. InstanceID string // UserAgent is the user-agent identifier that the client will use in // HTTP requests to the IBM Cloud API. UserAgent string // Zones is a list of DNS zones in which the DNS provider manages DNS records. Zones []string // ServiceEndpointOverrides stores overrides for certain services. ServiceEndpointOverrides ServiceEndpointOverrides }
Config holds common configuration of IBM DNS providers.
type ServiceEndpointOverrides ¶
type ServiceEndpointOverrides struct { // CIS is the URL override for the CIS service endpoint. If this is blank, the default service endpoint is used. CIS string // DNS is the URL override for the DNS service endpoint. If this is blank, the default service endpoint is used. DNS string // IAM is the URL override for the IAM service endpoint. If this is blank, the default service endpoint is used. IAM string }
ServiceEndpointOverrides can be used to override the service endpoints. To determine which URLs to use, client code should always use the Get... functions, which return the default URL when no override is in place for a particular endpoint or the overridden URL if it's set for that endpoint. This struct allows overrides to be set/cleared easily during runtime.
func (ServiceEndpointOverrides) GetCISEndpoint ¶
func (s ServiceEndpointOverrides) GetCISEndpoint() string
func (ServiceEndpointOverrides) GetDNSEndpoint ¶
func (s ServiceEndpointOverrides) GetDNSEndpoint() string
func (ServiceEndpointOverrides) GetIAMEndpoint ¶
func (s ServiceEndpointOverrides) GetIAMEndpoint() string
Click to show internal directories.
Click to hide internal directories.