mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: github.com/aws/aws-sdk-go-v2/config v1.26.6
vendor github.com/aws/aws-sdk-go-v2/config v1.26.6 and related dependencies. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
94
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/arn.go
generated
vendored
Normal file
94
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/arn.go
generated
vendored
Normal file
@ -0,0 +1,94 @@
|
||||
package awsrulesfn
|
||||
|
||||
import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// ARN provides AWS ARN components broken out into a data structure.
|
||||
type ARN struct {
|
||||
Partition string
|
||||
Service string
|
||||
Region string
|
||||
AccountId string
|
||||
ResourceId OptionalStringSlice
|
||||
}
|
||||
|
||||
const (
|
||||
arnDelimiters = ":"
|
||||
resourceDelimiters = "/:"
|
||||
arnSections = 6
|
||||
arnPrefix = "arn:"
|
||||
|
||||
// zero-indexed
|
||||
sectionPartition = 1
|
||||
sectionService = 2
|
||||
sectionRegion = 3
|
||||
sectionAccountID = 4
|
||||
sectionResource = 5
|
||||
)
|
||||
|
||||
// ParseARN returns an [ARN] value parsed from the input string provided. If
|
||||
// the ARN cannot be parsed nil will be returned, and error added to
|
||||
// [ErrorCollector].
|
||||
func ParseARN(input string) *ARN {
|
||||
if !strings.HasPrefix(input, arnPrefix) {
|
||||
return nil
|
||||
}
|
||||
|
||||
sections := strings.SplitN(input, arnDelimiters, arnSections)
|
||||
if numSections := len(sections); numSections != arnSections {
|
||||
return nil
|
||||
}
|
||||
|
||||
if sections[sectionPartition] == "" {
|
||||
return nil
|
||||
}
|
||||
if sections[sectionService] == "" {
|
||||
return nil
|
||||
}
|
||||
if sections[sectionResource] == "" {
|
||||
return nil
|
||||
}
|
||||
|
||||
return &ARN{
|
||||
Partition: sections[sectionPartition],
|
||||
Service: sections[sectionService],
|
||||
Region: sections[sectionRegion],
|
||||
AccountId: sections[sectionAccountID],
|
||||
ResourceId: splitResource(sections[sectionResource]),
|
||||
}
|
||||
}
|
||||
|
||||
// splitResource splits the resource components by the ARN resource delimiters.
|
||||
func splitResource(v string) []string {
|
||||
var parts []string
|
||||
var offset int
|
||||
|
||||
for offset <= len(v) {
|
||||
idx := strings.IndexAny(v[offset:], "/:")
|
||||
if idx < 0 {
|
||||
parts = append(parts, v[offset:])
|
||||
break
|
||||
}
|
||||
parts = append(parts, v[offset:idx+offset])
|
||||
offset += idx + 1
|
||||
}
|
||||
|
||||
return parts
|
||||
}
|
||||
|
||||
// OptionalStringSlice provides a helper to safely get the index of a string
|
||||
// slice that may be out of bounds. Returns pointer to string if index is
|
||||
// valid. Otherwise returns nil.
|
||||
type OptionalStringSlice []string
|
||||
|
||||
// Get returns a string pointer of the string at index i if the index is valid.
|
||||
// Otherwise returns nil.
|
||||
func (s OptionalStringSlice) Get(i int) *string {
|
||||
if i < 0 || i >= len(s) {
|
||||
return nil
|
||||
}
|
||||
|
||||
v := s[i]
|
||||
return &v
|
||||
}
|
3
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/doc.go
generated
vendored
Normal file
3
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/doc.go
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
// Package awsrulesfn provides AWS focused endpoint rule functions for
|
||||
// evaluating endpoint resolution rules.
|
||||
package awsrulesfn
|
7
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/generate.go
generated
vendored
Normal file
7
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/generate.go
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
//go:build codegen
|
||||
// +build codegen
|
||||
|
||||
package awsrulesfn
|
||||
|
||||
//go:generate go run -tags codegen ./internal/partition/codegen.go -model partitions.json -output partitions.go
|
||||
//go:generate gofmt -w -s .
|
51
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/host.go
generated
vendored
Normal file
51
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/host.go
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
package awsrulesfn
|
||||
|
||||
import (
|
||||
"net"
|
||||
"strings"
|
||||
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// IsVirtualHostableS3Bucket returns if the input is a DNS compatible bucket
|
||||
// name and can be used with Amazon S3 virtual hosted style addressing. Similar
|
||||
// to [rulesfn.IsValidHostLabel] with the added restriction that the length of label
|
||||
// must be [3:63] characters long, all lowercase, and not formatted as an IP
|
||||
// address.
|
||||
func IsVirtualHostableS3Bucket(input string, allowSubDomains bool) bool {
|
||||
// input should not be formatted as an IP address
|
||||
// NOTE: this will technically trip up on IPv6 hosts with zone IDs, but
|
||||
// validation further down will catch that anyway (it's guaranteed to have
|
||||
// unfriendly characters % and : if that's the case)
|
||||
if net.ParseIP(input) != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
var labels []string
|
||||
if allowSubDomains {
|
||||
labels = strings.Split(input, ".")
|
||||
} else {
|
||||
labels = []string{input}
|
||||
}
|
||||
|
||||
for _, label := range labels {
|
||||
// validate special length constraints
|
||||
if l := len(label); l < 3 || l > 63 {
|
||||
return false
|
||||
}
|
||||
|
||||
// Validate no capital letters
|
||||
for _, r := range label {
|
||||
if r >= 'A' && r <= 'Z' {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// Validate valid host label
|
||||
if !smithyhttp.ValidHostLabel(label) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
75
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go
generated
vendored
Normal file
75
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go
generated
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
package awsrulesfn
|
||||
|
||||
import "regexp"
|
||||
|
||||
// Partition provides the metadata describing an AWS partition.
|
||||
type Partition struct {
|
||||
ID string `json:"id"`
|
||||
Regions map[string]RegionOverrides `json:"regions"`
|
||||
RegionRegex string `json:"regionRegex"`
|
||||
DefaultConfig PartitionConfig `json:"outputs"`
|
||||
}
|
||||
|
||||
// PartitionConfig provides the endpoint metadata for an AWS region or partition.
|
||||
type PartitionConfig struct {
|
||||
Name string `json:"name"`
|
||||
DnsSuffix string `json:"dnsSuffix"`
|
||||
DualStackDnsSuffix string `json:"dualStackDnsSuffix"`
|
||||
SupportsFIPS bool `json:"supportsFIPS"`
|
||||
SupportsDualStack bool `json:"supportsDualStack"`
|
||||
}
|
||||
|
||||
type RegionOverrides struct {
|
||||
Name *string `json:"name"`
|
||||
DnsSuffix *string `json:"dnsSuffix"`
|
||||
DualStackDnsSuffix *string `json:"dualStackDnsSuffix"`
|
||||
SupportsFIPS *bool `json:"supportsFIPS"`
|
||||
SupportsDualStack *bool `json:"supportsDualStack"`
|
||||
}
|
||||
|
||||
const defaultPartition = "aws"
|
||||
|
||||
func getPartition(partitions []Partition, region string) *PartitionConfig {
|
||||
for _, partition := range partitions {
|
||||
if v, ok := partition.Regions[region]; ok {
|
||||
p := mergeOverrides(partition.DefaultConfig, v)
|
||||
return &p
|
||||
}
|
||||
}
|
||||
|
||||
for _, partition := range partitions {
|
||||
regionRegex := regexp.MustCompile(partition.RegionRegex)
|
||||
if regionRegex.MatchString(region) {
|
||||
v := partition.DefaultConfig
|
||||
return &v
|
||||
}
|
||||
}
|
||||
|
||||
for _, partition := range partitions {
|
||||
if partition.ID == defaultPartition {
|
||||
v := partition.DefaultConfig
|
||||
return &v
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func mergeOverrides(into PartitionConfig, from RegionOverrides) PartitionConfig {
|
||||
if from.Name != nil {
|
||||
into.Name = *from.Name
|
||||
}
|
||||
if from.DnsSuffix != nil {
|
||||
into.DnsSuffix = *from.DnsSuffix
|
||||
}
|
||||
if from.DualStackDnsSuffix != nil {
|
||||
into.DualStackDnsSuffix = *from.DualStackDnsSuffix
|
||||
}
|
||||
if from.SupportsFIPS != nil {
|
||||
into.SupportsFIPS = *from.SupportsFIPS
|
||||
}
|
||||
if from.SupportsDualStack != nil {
|
||||
into.SupportsDualStack = *from.SupportsDualStack
|
||||
}
|
||||
return into
|
||||
}
|
381
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go
generated
vendored
Normal file
381
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go
generated
vendored
Normal file
@ -0,0 +1,381 @@
|
||||
// Code generated by endpoint/awsrulesfn/internal/partition. DO NOT EDIT.
|
||||
|
||||
package awsrulesfn
|
||||
|
||||
// GetPartition returns an AWS [Partition] for the region provided. If the
|
||||
// partition cannot be determined nil will be returned.
|
||||
func GetPartition(region string) *PartitionConfig {
|
||||
return getPartition(partitions, region)
|
||||
}
|
||||
|
||||
var partitions = []Partition{
|
||||
{
|
||||
ID: "aws",
|
||||
RegionRegex: "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$",
|
||||
DefaultConfig: PartitionConfig{
|
||||
Name: "aws",
|
||||
DnsSuffix: "amazonaws.com",
|
||||
DualStackDnsSuffix: "api.aws",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: true,
|
||||
},
|
||||
Regions: map[string]RegionOverrides{
|
||||
"af-south-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"ap-east-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"ap-northeast-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"ap-northeast-2": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"ap-northeast-3": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"ap-south-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"ap-south-2": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"ap-southeast-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"ap-southeast-2": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"ap-southeast-3": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"ap-southeast-4": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"aws-global": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"ca-central-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"eu-central-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"eu-central-2": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"eu-north-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"eu-south-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"eu-south-2": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"eu-west-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"eu-west-2": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"eu-west-3": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"il-central-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"me-central-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"me-south-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"sa-east-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"us-east-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"us-east-2": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"us-west-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"us-west-2": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
ID: "aws-cn",
|
||||
RegionRegex: "^cn\\-\\w+\\-\\d+$",
|
||||
DefaultConfig: PartitionConfig{
|
||||
Name: "aws-cn",
|
||||
DnsSuffix: "amazonaws.com.cn",
|
||||
DualStackDnsSuffix: "api.amazonwebservices.com.cn",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: true,
|
||||
},
|
||||
Regions: map[string]RegionOverrides{
|
||||
"aws-cn-global": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"cn-north-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"cn-northwest-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
ID: "aws-us-gov",
|
||||
RegionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
|
||||
DefaultConfig: PartitionConfig{
|
||||
Name: "aws-us-gov",
|
||||
DnsSuffix: "amazonaws.com",
|
||||
DualStackDnsSuffix: "api.aws",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: true,
|
||||
},
|
||||
Regions: map[string]RegionOverrides{
|
||||
"aws-us-gov-global": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"us-gov-east-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"us-gov-west-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
ID: "aws-iso",
|
||||
RegionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
|
||||
DefaultConfig: PartitionConfig{
|
||||
Name: "aws-iso",
|
||||
DnsSuffix: "c2s.ic.gov",
|
||||
DualStackDnsSuffix: "c2s.ic.gov",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: false,
|
||||
},
|
||||
Regions: map[string]RegionOverrides{
|
||||
"aws-iso-global": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"us-iso-east-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"us-iso-west-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
ID: "aws-iso-b",
|
||||
RegionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
|
||||
DefaultConfig: PartitionConfig{
|
||||
Name: "aws-iso-b",
|
||||
DnsSuffix: "sc2s.sgov.gov",
|
||||
DualStackDnsSuffix: "sc2s.sgov.gov",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: false,
|
||||
},
|
||||
Regions: map[string]RegionOverrides{
|
||||
"aws-iso-b-global": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
"us-isob-east-1": {
|
||||
Name: nil,
|
||||
DnsSuffix: nil,
|
||||
DualStackDnsSuffix: nil,
|
||||
SupportsFIPS: nil,
|
||||
SupportsDualStack: nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
ID: "aws-iso-e",
|
||||
RegionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$",
|
||||
DefaultConfig: PartitionConfig{
|
||||
Name: "aws-iso-e",
|
||||
DnsSuffix: "cloud.adc-e.uk",
|
||||
DualStackDnsSuffix: "cloud.adc-e.uk",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: false,
|
||||
},
|
||||
Regions: map[string]RegionOverrides{},
|
||||
},
|
||||
{
|
||||
ID: "aws-iso-f",
|
||||
RegionRegex: "^us\\-isof\\-\\w+\\-\\d+$",
|
||||
DefaultConfig: PartitionConfig{
|
||||
Name: "aws-iso-f",
|
||||
DnsSuffix: "csp.hci.ic.gov",
|
||||
DualStackDnsSuffix: "csp.hci.ic.gov",
|
||||
SupportsFIPS: true,
|
||||
SupportsDualStack: false,
|
||||
},
|
||||
Regions: map[string]RegionOverrides{},
|
||||
},
|
||||
}
|
216
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json
generated
vendored
Normal file
216
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json
generated
vendored
Normal file
@ -0,0 +1,216 @@
|
||||
{
|
||||
"partitions" : [ {
|
||||
"id" : "aws",
|
||||
"outputs" : {
|
||||
"dnsSuffix" : "amazonaws.com",
|
||||
"dualStackDnsSuffix" : "api.aws",
|
||||
"implicitGlobalRegion" : "us-east-1",
|
||||
"name" : "aws",
|
||||
"supportsDualStack" : true,
|
||||
"supportsFIPS" : true
|
||||
},
|
||||
"regionRegex" : "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$",
|
||||
"regions" : {
|
||||
"af-south-1" : {
|
||||
"description" : "Africa (Cape Town)"
|
||||
},
|
||||
"ap-east-1" : {
|
||||
"description" : "Asia Pacific (Hong Kong)"
|
||||
},
|
||||
"ap-northeast-1" : {
|
||||
"description" : "Asia Pacific (Tokyo)"
|
||||
},
|
||||
"ap-northeast-2" : {
|
||||
"description" : "Asia Pacific (Seoul)"
|
||||
},
|
||||
"ap-northeast-3" : {
|
||||
"description" : "Asia Pacific (Osaka)"
|
||||
},
|
||||
"ap-south-1" : {
|
||||
"description" : "Asia Pacific (Mumbai)"
|
||||
},
|
||||
"ap-south-2" : {
|
||||
"description" : "Asia Pacific (Hyderabad)"
|
||||
},
|
||||
"ap-southeast-1" : {
|
||||
"description" : "Asia Pacific (Singapore)"
|
||||
},
|
||||
"ap-southeast-2" : {
|
||||
"description" : "Asia Pacific (Sydney)"
|
||||
},
|
||||
"ap-southeast-3" : {
|
||||
"description" : "Asia Pacific (Jakarta)"
|
||||
},
|
||||
"ap-southeast-4" : {
|
||||
"description" : "Asia Pacific (Melbourne)"
|
||||
},
|
||||
"aws-global" : {
|
||||
"description" : "AWS Standard global region"
|
||||
},
|
||||
"ca-central-1" : {
|
||||
"description" : "Canada (Central)"
|
||||
},
|
||||
"ca-west-1" : {
|
||||
"description" : "Canada West (Calgary)"
|
||||
},
|
||||
"eu-central-1" : {
|
||||
"description" : "Europe (Frankfurt)"
|
||||
},
|
||||
"eu-central-2" : {
|
||||
"description" : "Europe (Zurich)"
|
||||
},
|
||||
"eu-north-1" : {
|
||||
"description" : "Europe (Stockholm)"
|
||||
},
|
||||
"eu-south-1" : {
|
||||
"description" : "Europe (Milan)"
|
||||
},
|
||||
"eu-south-2" : {
|
||||
"description" : "Europe (Spain)"
|
||||
},
|
||||
"eu-west-1" : {
|
||||
"description" : "Europe (Ireland)"
|
||||
},
|
||||
"eu-west-2" : {
|
||||
"description" : "Europe (London)"
|
||||
},
|
||||
"eu-west-3" : {
|
||||
"description" : "Europe (Paris)"
|
||||
},
|
||||
"il-central-1" : {
|
||||
"description" : "Israel (Tel Aviv)"
|
||||
},
|
||||
"me-central-1" : {
|
||||
"description" : "Middle East (UAE)"
|
||||
},
|
||||
"me-south-1" : {
|
||||
"description" : "Middle East (Bahrain)"
|
||||
},
|
||||
"sa-east-1" : {
|
||||
"description" : "South America (Sao Paulo)"
|
||||
},
|
||||
"us-east-1" : {
|
||||
"description" : "US East (N. Virginia)"
|
||||
},
|
||||
"us-east-2" : {
|
||||
"description" : "US East (Ohio)"
|
||||
},
|
||||
"us-west-1" : {
|
||||
"description" : "US West (N. California)"
|
||||
},
|
||||
"us-west-2" : {
|
||||
"description" : "US West (Oregon)"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"id" : "aws-cn",
|
||||
"outputs" : {
|
||||
"dnsSuffix" : "amazonaws.com.cn",
|
||||
"dualStackDnsSuffix" : "api.amazonwebservices.com.cn",
|
||||
"implicitGlobalRegion" : "cn-northwest-1",
|
||||
"name" : "aws-cn",
|
||||
"supportsDualStack" : true,
|
||||
"supportsFIPS" : true
|
||||
},
|
||||
"regionRegex" : "^cn\\-\\w+\\-\\d+$",
|
||||
"regions" : {
|
||||
"aws-cn-global" : {
|
||||
"description" : "AWS China global region"
|
||||
},
|
||||
"cn-north-1" : {
|
||||
"description" : "China (Beijing)"
|
||||
},
|
||||
"cn-northwest-1" : {
|
||||
"description" : "China (Ningxia)"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"id" : "aws-us-gov",
|
||||
"outputs" : {
|
||||
"dnsSuffix" : "amazonaws.com",
|
||||
"dualStackDnsSuffix" : "api.aws",
|
||||
"implicitGlobalRegion" : "us-gov-west-1",
|
||||
"name" : "aws-us-gov",
|
||||
"supportsDualStack" : true,
|
||||
"supportsFIPS" : true
|
||||
},
|
||||
"regionRegex" : "^us\\-gov\\-\\w+\\-\\d+$",
|
||||
"regions" : {
|
||||
"aws-us-gov-global" : {
|
||||
"description" : "AWS GovCloud (US) global region"
|
||||
},
|
||||
"us-gov-east-1" : {
|
||||
"description" : "AWS GovCloud (US-East)"
|
||||
},
|
||||
"us-gov-west-1" : {
|
||||
"description" : "AWS GovCloud (US-West)"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"id" : "aws-iso",
|
||||
"outputs" : {
|
||||
"dnsSuffix" : "c2s.ic.gov",
|
||||
"dualStackDnsSuffix" : "c2s.ic.gov",
|
||||
"implicitGlobalRegion" : "us-iso-east-1",
|
||||
"name" : "aws-iso",
|
||||
"supportsDualStack" : false,
|
||||
"supportsFIPS" : true
|
||||
},
|
||||
"regionRegex" : "^us\\-iso\\-\\w+\\-\\d+$",
|
||||
"regions" : {
|
||||
"aws-iso-global" : {
|
||||
"description" : "AWS ISO (US) global region"
|
||||
},
|
||||
"us-iso-east-1" : {
|
||||
"description" : "US ISO East"
|
||||
},
|
||||
"us-iso-west-1" : {
|
||||
"description" : "US ISO WEST"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"id" : "aws-iso-b",
|
||||
"outputs" : {
|
||||
"dnsSuffix" : "sc2s.sgov.gov",
|
||||
"dualStackDnsSuffix" : "sc2s.sgov.gov",
|
||||
"implicitGlobalRegion" : "us-isob-east-1",
|
||||
"name" : "aws-iso-b",
|
||||
"supportsDualStack" : false,
|
||||
"supportsFIPS" : true
|
||||
},
|
||||
"regionRegex" : "^us\\-isob\\-\\w+\\-\\d+$",
|
||||
"regions" : {
|
||||
"aws-iso-b-global" : {
|
||||
"description" : "AWS ISOB (US) global region"
|
||||
},
|
||||
"us-isob-east-1" : {
|
||||
"description" : "US ISOB East (Ohio)"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"id" : "aws-iso-e",
|
||||
"outputs" : {
|
||||
"dnsSuffix" : "cloud.adc-e.uk",
|
||||
"dualStackDnsSuffix" : "cloud.adc-e.uk",
|
||||
"implicitGlobalRegion" : "eu-isoe-west-1",
|
||||
"name" : "aws-iso-e",
|
||||
"supportsDualStack" : false,
|
||||
"supportsFIPS" : true
|
||||
},
|
||||
"regionRegex" : "^eu\\-isoe\\-\\w+\\-\\d+$",
|
||||
"regions" : { }
|
||||
}, {
|
||||
"id" : "aws-iso-f",
|
||||
"outputs" : {
|
||||
"dnsSuffix" : "csp.hci.ic.gov",
|
||||
"dualStackDnsSuffix" : "csp.hci.ic.gov",
|
||||
"implicitGlobalRegion" : "us-isof-south-1",
|
||||
"name" : "aws-iso-f",
|
||||
"supportsDualStack" : false,
|
||||
"supportsFIPS" : true
|
||||
},
|
||||
"regionRegex" : "^us\\-isof\\-\\w+\\-\\d+$",
|
||||
"regions" : { }
|
||||
} ],
|
||||
"version" : "1.1"
|
||||
}
|
201
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/endpoints.go
generated
vendored
Normal file
201
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/endpoints.go
generated
vendored
Normal file
@ -0,0 +1,201 @@
|
||||
package endpoints
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
)
|
||||
|
||||
const (
|
||||
defaultProtocol = "https"
|
||||
defaultSigner = "v4"
|
||||
)
|
||||
|
||||
var (
|
||||
protocolPriority = []string{"https", "http"}
|
||||
signerPriority = []string{"v4"}
|
||||
)
|
||||
|
||||
// Options provide configuration needed to direct how endpoints are resolved.
|
||||
type Options struct {
|
||||
// Disable usage of HTTPS (TLS / SSL)
|
||||
DisableHTTPS bool
|
||||
}
|
||||
|
||||
// Partitions is a slice of partition
|
||||
type Partitions []Partition
|
||||
|
||||
// ResolveEndpoint resolves a service endpoint for the given region and options.
|
||||
func (ps Partitions) ResolveEndpoint(region string, opts Options) (aws.Endpoint, error) {
|
||||
if len(ps) == 0 {
|
||||
return aws.Endpoint{}, fmt.Errorf("no partitions found")
|
||||
}
|
||||
|
||||
for i := 0; i < len(ps); i++ {
|
||||
if !ps[i].canResolveEndpoint(region) {
|
||||
continue
|
||||
}
|
||||
|
||||
return ps[i].ResolveEndpoint(region, opts)
|
||||
}
|
||||
|
||||
// fallback to first partition format to use when resolving the endpoint.
|
||||
return ps[0].ResolveEndpoint(region, opts)
|
||||
}
|
||||
|
||||
// Partition is an AWS partition description for a service and its' region endpoints.
|
||||
type Partition struct {
|
||||
ID string
|
||||
RegionRegex *regexp.Regexp
|
||||
PartitionEndpoint string
|
||||
IsRegionalized bool
|
||||
Defaults Endpoint
|
||||
Endpoints Endpoints
|
||||
}
|
||||
|
||||
func (p Partition) canResolveEndpoint(region string) bool {
|
||||
_, ok := p.Endpoints[region]
|
||||
return ok || p.RegionRegex.MatchString(region)
|
||||
}
|
||||
|
||||
// ResolveEndpoint resolves and service endpoint for the given region and options.
|
||||
func (p Partition) ResolveEndpoint(region string, options Options) (resolved aws.Endpoint, err error) {
|
||||
if len(region) == 0 && len(p.PartitionEndpoint) != 0 {
|
||||
region = p.PartitionEndpoint
|
||||
}
|
||||
|
||||
e, _ := p.endpointForRegion(region)
|
||||
|
||||
return e.resolve(p.ID, region, p.Defaults, options), nil
|
||||
}
|
||||
|
||||
func (p Partition) endpointForRegion(region string) (Endpoint, bool) {
|
||||
if e, ok := p.Endpoints[region]; ok {
|
||||
return e, true
|
||||
}
|
||||
|
||||
if !p.IsRegionalized {
|
||||
return p.Endpoints[p.PartitionEndpoint], region == p.PartitionEndpoint
|
||||
}
|
||||
|
||||
// Unable to find any matching endpoint, return
|
||||
// blank that will be used for generic endpoint creation.
|
||||
return Endpoint{}, false
|
||||
}
|
||||
|
||||
// Endpoints is a map of service config regions to endpoints
|
||||
type Endpoints map[string]Endpoint
|
||||
|
||||
// CredentialScope is the credential scope of a region and service
|
||||
type CredentialScope struct {
|
||||
Region string
|
||||
Service string
|
||||
}
|
||||
|
||||
// Endpoint is a service endpoint description
|
||||
type Endpoint struct {
|
||||
// True if the endpoint cannot be resolved for this partition/region/service
|
||||
Unresolveable aws.Ternary
|
||||
|
||||
Hostname string
|
||||
Protocols []string
|
||||
|
||||
CredentialScope CredentialScope
|
||||
|
||||
SignatureVersions []string `json:"signatureVersions"`
|
||||
}
|
||||
|
||||
func (e Endpoint) resolve(partition, region string, def Endpoint, options Options) aws.Endpoint {
|
||||
var merged Endpoint
|
||||
merged.mergeIn(def)
|
||||
merged.mergeIn(e)
|
||||
e = merged
|
||||
|
||||
var u string
|
||||
if e.Unresolveable != aws.TrueTernary {
|
||||
// Only attempt to resolve the endpoint if it can be resolved.
|
||||
hostname := strings.Replace(e.Hostname, "{region}", region, 1)
|
||||
|
||||
scheme := getEndpointScheme(e.Protocols, options.DisableHTTPS)
|
||||
u = scheme + "://" + hostname
|
||||
}
|
||||
|
||||
signingRegion := e.CredentialScope.Region
|
||||
if len(signingRegion) == 0 {
|
||||
signingRegion = region
|
||||
}
|
||||
signingName := e.CredentialScope.Service
|
||||
|
||||
return aws.Endpoint{
|
||||
URL: u,
|
||||
PartitionID: partition,
|
||||
SigningRegion: signingRegion,
|
||||
SigningName: signingName,
|
||||
SigningMethod: getByPriority(e.SignatureVersions, signerPriority, defaultSigner),
|
||||
}
|
||||
}
|
||||
|
||||
func (e *Endpoint) mergeIn(other Endpoint) {
|
||||
if other.Unresolveable != aws.UnknownTernary {
|
||||
e.Unresolveable = other.Unresolveable
|
||||
}
|
||||
if len(other.Hostname) > 0 {
|
||||
e.Hostname = other.Hostname
|
||||
}
|
||||
if len(other.Protocols) > 0 {
|
||||
e.Protocols = other.Protocols
|
||||
}
|
||||
if len(other.CredentialScope.Region) > 0 {
|
||||
e.CredentialScope.Region = other.CredentialScope.Region
|
||||
}
|
||||
if len(other.CredentialScope.Service) > 0 {
|
||||
e.CredentialScope.Service = other.CredentialScope.Service
|
||||
}
|
||||
if len(other.SignatureVersions) > 0 {
|
||||
e.SignatureVersions = other.SignatureVersions
|
||||
}
|
||||
}
|
||||
|
||||
func getEndpointScheme(protocols []string, disableHTTPS bool) string {
|
||||
if disableHTTPS {
|
||||
return "http"
|
||||
}
|
||||
|
||||
return getByPriority(protocols, protocolPriority, defaultProtocol)
|
||||
}
|
||||
|
||||
func getByPriority(s []string, p []string, def string) string {
|
||||
if len(s) == 0 {
|
||||
return def
|
||||
}
|
||||
|
||||
for i := 0; i < len(p); i++ {
|
||||
for j := 0; j < len(s); j++ {
|
||||
if s[j] == p[i] {
|
||||
return s[j]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return s[0]
|
||||
}
|
||||
|
||||
// MapFIPSRegion extracts the intrinsic AWS region from one that may have an
|
||||
// embedded FIPS microformat.
|
||||
func MapFIPSRegion(region string) string {
|
||||
const fipsInfix = "-fips-"
|
||||
const fipsPrefix = "fips-"
|
||||
const fipsSuffix = "-fips"
|
||||
|
||||
if strings.Contains(region, fipsInfix) ||
|
||||
strings.Contains(region, fipsPrefix) ||
|
||||
strings.Contains(region, fipsSuffix) {
|
||||
region = strings.ReplaceAll(region, fipsInfix, "-")
|
||||
region = strings.ReplaceAll(region, fipsPrefix, "")
|
||||
region = strings.ReplaceAll(region, fipsSuffix, "")
|
||||
}
|
||||
|
||||
return region
|
||||
}
|
97
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
generated
vendored
97
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
generated
vendored
@ -1,3 +1,100 @@
|
||||
# v2.5.10 (2024-01-04)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.5.9 (2023-12-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.5.8 (2023-12-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.5.7 (2023-11-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.5.6 (2023-11-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.5.5 (2023-11-28.2)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.5.4 (2023-11-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.5.3 (2023-11-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.5.2 (2023-11-09)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.5.1 (2023-11-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.5.0 (2023-10-31)
|
||||
|
||||
* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.37 (2023-10-12)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.36 (2023-10-06)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.35 (2023-08-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.34 (2023-08-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.33 (2023-08-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.32 (2023-08-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.31 (2023-07-31)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.30 (2023-07-28)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.29 (2023-07-13)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.28 (2023-06-13)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.27 (2023-04-24)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.26 (2023-04-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.25 (2023-03-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.24 (2023-03-10)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
generated
vendored
@ -3,4 +3,4 @@
|
||||
package endpoints
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "2.4.24"
|
||||
const goModuleVersion = "2.5.10"
|
||||
|
Reference in New Issue
Block a user