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:
103
vendor/github.com/aws/aws-sdk-go-v2/config/provider.go
generated
vendored
103
vendor/github.com/aws/aws-sdk-go-v2/config/provider.go
generated
vendored
@ -122,6 +122,109 @@ func getRegion(ctx context.Context, configs configs) (value string, found bool,
|
||||
return
|
||||
}
|
||||
|
||||
// IgnoreConfiguredEndpointsProvider is needed to search for all providers
|
||||
// that provide a flag to disable configured endpoints.
|
||||
type IgnoreConfiguredEndpointsProvider interface {
|
||||
GetIgnoreConfiguredEndpoints(ctx context.Context) (bool, bool, error)
|
||||
}
|
||||
|
||||
// GetIgnoreConfiguredEndpoints is used in knowing when to disable configured
|
||||
// endpoints feature.
|
||||
func GetIgnoreConfiguredEndpoints(ctx context.Context, configs []interface{}) (value bool, found bool, err error) {
|
||||
for _, cfg := range configs {
|
||||
if p, ok := cfg.(IgnoreConfiguredEndpointsProvider); ok {
|
||||
value, found, err = p.GetIgnoreConfiguredEndpoints(ctx)
|
||||
if err != nil || found {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
type baseEndpointProvider interface {
|
||||
getBaseEndpoint(ctx context.Context) (string, bool, error)
|
||||
}
|
||||
|
||||
func getBaseEndpoint(ctx context.Context, configs configs) (value string, found bool, err error) {
|
||||
for _, cfg := range configs {
|
||||
if p, ok := cfg.(baseEndpointProvider); ok {
|
||||
value, found, err = p.getBaseEndpoint(ctx)
|
||||
if err != nil || found {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
type servicesObjectProvider interface {
|
||||
getServicesObject(ctx context.Context) (map[string]map[string]string, bool, error)
|
||||
}
|
||||
|
||||
func getServicesObject(ctx context.Context, configs configs) (value map[string]map[string]string, found bool, err error) {
|
||||
for _, cfg := range configs {
|
||||
if p, ok := cfg.(servicesObjectProvider); ok {
|
||||
value, found, err = p.getServicesObject(ctx)
|
||||
if err != nil || found {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// appIDProvider provides access to the sdk app ID value
|
||||
type appIDProvider interface {
|
||||
getAppID(ctx context.Context) (string, bool, error)
|
||||
}
|
||||
|
||||
func getAppID(ctx context.Context, configs configs) (value string, found bool, err error) {
|
||||
for _, cfg := range configs {
|
||||
if p, ok := cfg.(appIDProvider); ok {
|
||||
value, found, err = p.getAppID(ctx)
|
||||
if err != nil || found {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// disableRequestCompressionProvider provides access to the DisableRequestCompression
|
||||
type disableRequestCompressionProvider interface {
|
||||
getDisableRequestCompression(context.Context) (bool, bool, error)
|
||||
}
|
||||
|
||||
func getDisableRequestCompression(ctx context.Context, configs configs) (value bool, found bool, err error) {
|
||||
for _, cfg := range configs {
|
||||
if p, ok := cfg.(disableRequestCompressionProvider); ok {
|
||||
value, found, err = p.getDisableRequestCompression(ctx)
|
||||
if err != nil || found {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// requestMinCompressSizeBytesProvider provides access to the MinCompressSizeBytes
|
||||
type requestMinCompressSizeBytesProvider interface {
|
||||
getRequestMinCompressSizeBytes(context.Context) (int64, bool, error)
|
||||
}
|
||||
|
||||
func getRequestMinCompressSizeBytes(ctx context.Context, configs configs) (value int64, found bool, err error) {
|
||||
for _, cfg := range configs {
|
||||
if p, ok := cfg.(requestMinCompressSizeBytesProvider); ok {
|
||||
value, found, err = p.getRequestMinCompressSizeBytes(ctx)
|
||||
if err != nil || found {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// ec2IMDSRegionProvider provides access to the ec2 imds region
|
||||
// configuration value
|
||||
type ec2IMDSRegionProvider interface {
|
||||
|
Reference in New Issue
Block a user