func New(endpoint string, hc *http.Client) Client {
	return &client{endpoint: endpoint, httpClient: hc}
}
New creates a new Spinnaker client
package spinnaker
import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
	"net/url"
	"time"
	"strconv"
	"github.com/pkg/errors"
	"github.com/sirupsen/logrus"
)
var (
	ErrInvalidPipelineTemplate = errors.New("pipeline template is invalid")
)
type ClientConfig struct {
	HTTPClientFactory HTTPClientFactory
	Endpoint          string
}
type Client interface {
	PublishTemplate(template map[string]interface{}, options PublishTemplateOptions) (*TaskRefResponse, error)
	ApplicationSubmitTask(app string, task Task) (*TaskRefResponse, error)
	ApplicationGet(app string) (bool, []byte, error)
	ApplicationList() ([]ApplicationInfo, error)
	Plan(configuration map[string]interface{}, template map[string]interface{}) ([]byte, error)
	DeleteTemplate(templateID string) (*TaskRefResponse, error)
	ExecPipeline(appName string, pipeline string) (*TaskRefResponse, error)
	GetTask(refURL string) (*ExecutionResponse, error)
	PollTaskStatus(refURL string, timeout time.Duration) (*ExecutionResponse, error)
	GetPipelineConfig(app, pipelineConfigID string) (*PipelineConfig, error)
	SavePipelineConfig(pipelineConfig PipelineConfig) error
	ListPipelineConfigs(app string) ([]PipelineConfig, error)
	DeletePipeline(app, pipelineConfigID string) error
	FiatLogin(fiatUser string, fiatPass string) error
}
type client struct {
	endpoint   string
	httpClient *http.Client
}