//New - create a new heritage foundation integration wrapper
339857
func (s *MyHeritage) New(appEnv *cfenv.App) *MyHeritage {
	heritageAdminServiceName := os.Getenv("UPS_PEZ_HERITAGE_ADMIN_NAME")
	heritageLoginTargetName := os.Getenv("HERITAGE_LOGIN_TARGET_NAME")
	heritageLoginUserName := os.Getenv("HERITAGE_LOGIN_USER_NAME")
	heritageLoginPassName := os.Getenv("HERITAGE_LOGIN_PASS_NAME")
	heritageCCTargetName := os.Getenv("HERITAGE_CC_TARGET_NAME")
	heritageAdminService, err := appEnv.Services.WithName(heritageAdminServiceName)

	if err != nil {
		panic(fmt.Sprintf("heritage service name error: %s", err.Error()))
	}
	s.LoginTarget = heritageAdminService.Credentials[heritageLoginTargetName].(string)
	s.LoginUser = heritageAdminService.Credentials[heritageLoginUserName].(string)
	s.LoginPass = heritageAdminService.Credentials[heritageLoginPassName].(string)
	s.CCTarget = heritageAdminService.Credentials[heritageCCTargetName].(string)
	return s
}
483536
func New(parent context.Context) types.Context {
	return newContext(parent, nil, nil, nil, nil)
}
462742
func New(items ...interface{}) *Set {
	s := &Set{}
	s.m = make(map[interface{}]struct{})

	// Ensure interface compliance
	var _ Interface = s

	s.Add(items...)
	return s
}
859157
func New() (State, error) {
	state := &FusisState{
		services:     Services{},
		destinations: Destinations{},
	}

	return state, nil
}
312660
func New(name string, fn AssetFunc) *Template {
	return &Template{fn, template.New(name)}
}
721048
func New() *Framework {
	env := Environment{
		Name:     *fEnv,
		Provider: *fProvider,
		OS:       *fOS,
		Arch:     *fArch,
		Tags:     map[string]struct{}{},
	}
	for _, tag := range strings.Split(*fTags, ",") {
		env.Tags[tag] = struct{}{}
	}
	return &Framework{
		provisioner: DefaultProvisioner,
		env:         env,
		isLocalRun:  *fLocal,
		slow:        *fSlow,
		force:       *fForceRun,
	}
}
997054
func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
	return &Client{transport: transport, formats: formats}
}
897677
func (f FileSystemJSONLoaderFactory) New(source string) JSONLoader {
	return &jsonReferenceLoader{
		fs:     f.fs,
		source: source,
	}
}
960422
func New(typesMap derive.TypesMap, p derive.Printer, deps map[string]derive.Dependency) derive.Generator {
	return &gen{
		TypesMap: typesMap,
		printer:  p,
		fmap:     deps["fmap"],
		join:     deps["join"],
	}
}
502638
func (m *mongoStore) New(r *http.Request, name string) (*gSessions.Session, error) {
	session := gSessions.NewSession(m, name)
	session.Options = &gSessions.Options{
		Path:   m.options.Path,
		MaxAge: m.options.MaxAge,
	}
	session.IsNew = true
	var err error
	if cook, errToken := m.Token.GetToken(r, name); errToken == nil {
		err = securecookie.DecodeMulti(name, cook, &session.ID, m.Codecs...)
		if err == nil {
			ok, err := m.load(session)
			session.IsNew = !(err == nil && ok) // not new if no error and data available
		}
	}
	return session, err
}
478592
func New(m string, a ...interface{}) error {
	return errors.Wrap(fmt.Errorf(m, a...), 1)
}
1003869
func New(marshaler *jsonpb.Marshaler, unmarshaler *jsonpb.Unmarshaler, fallback swfsm.StateSerializer) *JSONPBStateSerializer {
	return &JSONPBStateSerializer{
		m:    marshaler,
		u:    unmarshaler,
		fbss: fallback,
	}
}
1164967
func New(transport runtime.ClientTransport, formats strfmt.Registry) *TodoList {
	// ensure nullable parameters have default
	if formats == nil {
		formats = strfmt.Default
	}

	cli := new(TodoList)
	cli.Transport = transport

	cli.Todos = todos.New(transport, formats)

	return cli
}
810182
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
	return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
945535
func (s *Scheme) New(kind unversioned.GroupVersionKind) (Object, error) {
	obj, err := s.raw.NewObject(kind)
	if err != nil {
		return nil, err
	}
	return obj.(Object), nil
}
1326840
func New() *Infrastructure {
	return &Infrastructure{
		Lock:            new(sync.RWMutex),
		Services:        make(map[string]*Service),
		UpdateTimestamp: time.Now().UnixNano(),
	}
}
383456
func New(settings *Settings, customHeadersFunc func(*http.Request) [][]byte) EventSource {
	if settings == nil {
		settings = DefaultSettings()
	}

	es := new(eventSource)
	es.customHeadersFunc = customHeadersFunc
	es.sink = make(chan message, 1)
	es.close = make(chan bool)
	es.staled = make(chan *consumer, 1)
	es.add = make(chan *consumer)
	es.consumers = list.New()
	es.timeout = settings.Timeout
	es.idleTimeout = settings.IdleTimeout
	es.closeOnTimeout = settings.CloseOnTimeout
	es.gzip = settings.Gzip
	go controlProcess(es)
	return es
}