autoconfigure

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2018 License: Apache-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package autoconfigure implement ConfigurableFactory

Index

Constants

View Source
const (
	System = "system"
)

Variables

View Source
var (
	// ErrInvalidMethod method is invalid
	ErrInvalidMethod = errors.New("[factory] method is invalid")

	// ErrFactoryCannotBeNil means that the InstantiateFactory can not be nil
	ErrFactoryCannotBeNil = errors.New("[factory] InstantiateFactory can not be nil")

	// ErrFactoryIsNotInitialized means that the InstantiateFactory is not initialized
	ErrFactoryIsNotInitialized = errors.New("[factory] InstantiateFactory is not initialized")

	// ErrInvalidObjectType means that the Configuration type is invalid, it should embeds app.PreConfiguration
	ErrInvalidObjectType = errors.New("[factory] invalid Configuration type, one of app.Configuration, app.PreConfiguration, or app.PostConfiguration need to be embedded")

	// ErrConfigurationNameIsTaken means that the configuration name is already taken
	ErrConfigurationNameIsTaken = errors.New("[factory] configuration name is already taken")

	// ErrComponentNameIsTaken means that the component name is already taken
	ErrComponentNameIsTaken = errors.New("[factory] component name is already taken")
)

Functions

This section is empty.

Types

type ConfigurableFactory

type ConfigurableFactory struct {
	*instantiate.InstantiateFactory
	// contains filtered or unexported fields
}

func (*ConfigurableFactory) Build

func (f *ConfigurableFactory) Build(configs [][]interface{})

Build build all auto configurations

func (*ConfigurableFactory) BuildSystemConfig

func (f *ConfigurableFactory) BuildSystemConfig() (systemConfig *system.Configuration, err error)

BuildSystemConfig build system configuration

func (*ConfigurableFactory) Configuration

func (f *ConfigurableFactory) Configuration(name string) interface{}

Configuration getter

func (*ConfigurableFactory) Initialize

func (f *ConfigurableFactory) Initialize(configurations cmap.ConcurrentMap) (err error)

Initialize initialize ConfigurableFactory

func (*ConfigurableFactory) Instantiate

func (f *ConfigurableFactory) Instantiate(configuration interface{}) (err error)

Instantiate run instantiation by method

func (*ConfigurableFactory) InstantiateByName added in v0.5.3

func (f *ConfigurableFactory) InstantiateByName(configuration interface{}, name string) (inst interface{}, err error)

InstantiateByName instantiate by method name

func (*ConfigurableFactory) InstantiateMethod added in v0.5.3

func (f *ConfigurableFactory) InstantiateMethod(configuration interface{}, method reflect.Method, methodName string) (inst interface{}, err error)

InstantiateMethod instantiate by iterated methods

func (*ConfigurableFactory) SystemConfiguration

func (f *ConfigurableFactory) SystemConfiguration() *system.Configuration

SystemConfiguration getter

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL