1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
|
//go:build go1.9
// +build go1.9
package endpoints
import "regexp"
type LoggerFunc func(...interface{})
func (l LoggerFunc) Log(i ...interface{}) {
l(i...)
}
var testPartitions = partitions{
partition{
ID: "part-id",
Name: "partitionName",
DNSSuffix: "amazonaws.com",
RegionRegex: regionRegex{
Regexp: func() *regexp.Regexp {
reg, _ := regexp.Compile("^(us|eu|ap|sa|ca)\\-\\w+\\-\\d+$")
return reg
}(),
},
Defaults: endpointDefaults{
{}: {
Hostname: "{service}.{region}.{dnsSuffix}",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
Regions: regions{
"us-east-1": region{
Description: "region description",
},
"us-west-2": region{},
},
Services: services{
"s3": service{},
"service1": service{
Defaults: endpointDefaults{
{}: {
CredentialScope: credentialScope{
Service: "service1",
},
},
},
Endpoints: serviceEndpoints{
{Region: "us-east-1"}: {},
{Region: "us-west-2"}: {},
{
Region: "us-west-2",
Variant: dualStackVariant,
}: {
Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
},
},
},
"service2": service{
Defaults: endpointDefaults{
{}: {
CredentialScope: credentialScope{
Service: "service2",
},
},
},
},
"httpService": service{
Defaults: endpointDefaults{
{}: {
Protocols: []string{"http"},
},
},
},
"globalService": service{
IsRegionalized: boxedFalse,
PartitionEndpoint: "aws-global",
Endpoints: serviceEndpoints{
{
Region: "aws-global",
}: {
CredentialScope: credentialScope{
Region: "us-east-1",
},
Hostname: "globalService.amazonaws.com",
},
{
Region: "fips-aws-global",
}: {
CredentialScope: credentialScope{
Region: "us-east-1",
},
Hostname: "globalService-fips.amazonaws.com",
},
},
},
},
},
}
|