// New returns a new Bee instance configured with the supplied options.
327528
func (factory *NotificationBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
	bee := NotificationBee{
		Bee: bees.NewBee(name, factory.ID(), description, options),
	}
	bee.ReloadOptions(options)

	return &bee
}
305998
func New(mode byte, bus embd.SPIBus) *MCP3008 {
	return &MCP3008{mode, bus}
}
784457
func New(cmd string, args []string) *simpleSource {
	return &simpleSource{command: cmd, args: args}
}
620670
func (factory *HelloBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
	bee := HelloBee{
		Bee: bees.NewBee(name, factory.ID(), description, options),
	}
	bee.ReloadOptions(options)

	return &bee
}
981112
func (factory *TransmissionBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
	bee := TransmissionBee{
		Bee: bees.NewBee(name, factory.ID(), description, options),
	}
	bee.ReloadOptions(options)

	return &bee
}
1230143
func New(code int32, message string, args ...interface{}) Error {
	if len(args) > 0 {
		return &apiError{code, fmt.Sprintf(message, args...)}
	}
	return &apiError{code, message}
}
479832
func (factory *FacebookBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
	bee := FacebookBee{
		Bee: bees.NewBee(name, factory.ID(), description, options),
	}
	bee.ReloadOptions(options)

	return &bee
}
1086648
func NewBeeConfig(name, class, description string, options BeeOptions) (BeeConfig, error) {
	if len(name) == 0 {
		return BeeConfig{}, errors.New("A Bee's name can't be empty")
	}

	b := GetBee(name)
	if b != nil {
		return BeeConfig{}, errors.New("A Bee with that name already exists")
	}

	f := GetFactory(class)
	if f == nil {
		return BeeConfig{}, errors.New("Invalid class specified")
	}

	return BeeConfig{
		Name:        name,
		Class:       class,
		Description: description,
		Options:     options,
	}, nil
}
989763
func New(bus embd.I2CBus, Range *Range) *L3GD20 {
	return &L3GD20{
		Bus:   bus,
		Range: Range,
	}
}
1075359
func (factory *SpaceAPIBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
	bee := SpaceAPIBee{
		Bee: bees.NewBee(name, factory.ID(), description, options),
	}
	bee.ReloadOptions(options)

	return &bee
}
291727
func New(robot *hal.Robot) (hal.Store, error) {
	c := &config{}
	env.MustProcess(c)
	s := &store{
		config: c,
	}
	s.SetRobot(robot)
	return s, nil
}
1260529
func (factory *OpenweathermapBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
	bee := OpenweathermapBee{
		Bee: bees.NewBee(name, factory.ID(), description, options),
	}
	bee.ReloadOptions(options)

	return &bee
}
536785
func New(key, email string, opts ...Option) (*API, error) {
	if key == "" || email == "" {
		return nil, errors.New(errEmptyCredentials)
	}

	api, err := newClient(opts...)
	if err != nil {
		return nil, err
	}

	api.APIKey = key
	api.APIEmail = email
	api.authType = AuthKeyEmail

	return api, nil
}
1331786
func New(opts Options) (*Server, error) {
	metadataURL := opts.URL
	metadataURL.Path = metadataURL.Path + "/metadata"
	ssoURL := opts.URL
	ssoURL.Path = ssoURL.Path + "/sso"
	logr := opts.Logger
	if logr == nil {
		logr = logger.DefaultLogger
	}

	s := &Server{
		serviceProviders: map[string]*saml.EntityDescriptor{},
		IDP: saml.IdentityProvider{
			Key:         opts.Key,
			Logger:      logr,
			Certificate: opts.Certificate,
			MetadataURL: metadataURL,
			SSOURL:      ssoURL,
		},
		logger: logr,
		Store:  opts.Store,
	}

	s.IDP.SessionProvider = s
	s.IDP.ServiceProviderProvider = s

	if err := s.initializeServices(); err != nil {
		return nil, err
	}
	s.InitializeHTTP()
	return s, nil
}
719195
func New(config *redis.Options) *Redis {
	client := redis.NewClient(config)
	return &Redis{Config: config, Client: client}
}
643950
func New(robot *hal.Robot) (hal.Adapter, error) {
	c := &config{}
	env.MustProcess(c)

	a := &adapter{
		user:     c.User,
		password: c.Password,
		resource: c.Resource,
		rooms:    func() []string { return strings.Split(c.Rooms, ",") }(),
	}
	a.SetRobot(robot)
	return a, nil
}
1147550
func New(w io.Writer, opts *BuilderOpts) (*Builder, error) {
	return newBuilder(w, opts)
}