func (r Region) Endpoint(service string, opts ResolveOptions) (aws.Endpoint, error) {
	return r.p.EndpointFor(service, r.id, opts)
}
Endpoint resolves an endpoint from the context of the region given
a service. See Partition.EndpointFor for usage and errors that can be returned.
package endpoints
import (
	"fmt"
	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
)
type ResolveOptions struct {
	DisableSSL bool
	UseDualStack bool
	StrictMatching bool
}
type Resolver struct {
	ResolveOptions
	partitions partitions
}
func (r *Resolver) ResolveEndpoint(service, region string) (aws.Endpoint, error) {
	return r.partitions.EndpointFor(service, region, r.ResolveOptions)
}
func (r *Resolver) Partitions() Partitions {
	return r.partitions.Partitions()
}
type Partitions []Partition
func (ps Partitions) ForRegion(id string) (Partition, bool) {
	for _, p := range ps {
		if _, ok := p.p.Regions[id]; ok || p.p.RegionRegex.MatchString(id) {
			return p, true
		}
	}
	return Partition{}, false
}
func (ps Partitions) ForPartition(id string) (Partition, bool) {
	for _, p := range ps {
		if p.ID() == id {
			return p, true
		}
	}
	return Partition{}, false
}
type Partition struct {
	id string
	p  *partition
}
func (p Partition) ID() string { return p.id }
func (p Partition) Endpoint(service, region string, opts ResolveOptions) (aws.Endpoint, error) {
	return p.p.EndpointFor(service, region, opts)
}
func (p Partition) Regions() map[string]Region {
	rs := map[string]Region{}
	for id := range p.p.Regions {
		rs[id] = Region{
			id: id,
			p:  p.p,
		}
	}
	return rs
}
func (p Partition) RegionsForService(id string) (map[string]Region, bool) {
	if _, ok := p.p.Services[id]; !ok {
		return nil, false
	}
	s := Service{
		id: id,
		p:  p.p,
	}
	return s.Regions(), true
}
func (p Partition) Services() map[string]Service {
	ss := map[string]Service{}
	for id := range p.p.Services {
		ss[id] = Service{
			id: id,
			p:  p.p,
		}
	}
	return ss
}
func (p Partition) Resolver() *Resolver {
	return &Resolver{
		partitions: partitions{*p.p},
	}
}
type Region struct {
	id, desc string
	p        *partition
}
func (r Region) ID() string { return r.id }