func getServiceRegistryAuth()

in internal/cs/pushimage.go [99:113]


func getServiceRegistryAuth(ctx context.Context, rlc RegistryLoginCreator) (*registry.AuthConfig, error) {
	out, err := rlc.CreateContainerServiceRegistryLogin(
		ctx,
		new(lightsail.CreateContainerServiceRegistryLoginInput),
	)
	if err != nil {
		return nil, err
	}

	return &registry.AuthConfig{
		Username:      aws.ToString(out.RegistryLogin.Username),
		Password:      aws.ToString(out.RegistryLogin.Password),
		ServerAddress: aws.ToString(out.RegistryLogin.Registry) + "/sr",
	}, nil
}