func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *ECR {
	svc := &ECR{
		Client: client.New(
			cfg,
			metadata.ClientInfo{
				ServiceName:   ServiceName,
				SigningRegion: signingRegion,
				Endpoint:      endpoint,
				APIVersion:    "2015-09-21",
				JSONVersion:   "1.1",
				TargetPrefix:  "AmazonEC2ContainerRegistry_V20150921",
			},
			handlers,
		),
	}
	svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
	svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
	svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
	svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
	svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
	if initClient != nil {
		initClient(svc.Client)
	}
	return svc
}
newClient creates, initializes and returns a new service client instance.
package ecr
import (
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/client"
	"github.com/aws/aws-sdk-go/aws/client/metadata"
	"github.com/aws/aws-sdk-go/aws/request"
	"github.com/aws/aws-sdk-go/aws/signer/v4"
	"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
type ECR struct {
	*client.Client
}
var initClient func(*client.Client)
var initRequest func(*request.Request)
const ServiceName = "ecr"
func New(p client.ConfigProvider, cfgs ...*aws.Config) *ECR {
	c := p.ClientConfig(ServiceName, cfgs...)
	return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
}