tcindex/tcindex.go
func NewFromEnv() *Index {
	c := tcclient.CredentialsFromEnvVars()
	return &Index{
		Credentials:  c,
		BaseURL:      tcclient.BaseURL(tcclient.RootURLFromEnvVars(), "index", "v1"),
		Authenticate: c.ClientID != "",
	}
}
func NewFromEnv() *Index {
	c := tcclient.CredentialsFromEnvVars()
	return &Index{
		Credentials:  c,
		BaseURL:      tcclient.BaseURL(tcclient.RootURLFromEnvVars(), "index", "v1"),
		Authenticate: c.ClientID != "",
	}
}
// NewFromEnv returns an *Index configured from environment variables.
//
// The root URL is taken from TASKCLUSTER_PROXY_URL if set to a non-empty
// string, otherwise from TASKCLUSTER_ROOT_URL if set, otherwise the empty
// string.
//
// The credentials are taken from environment variables:
//
//  TASKCLUSTER_CLIENT_ID
//  TASKCLUSTER_ACCESS_TOKEN
//  TASKCLUSTER_CERTIFICATE
//
// If TASKCLUSTER_CLIENT_ID is empty/unset, authentication will be
// disabled.