Documentation ¶
Index ¶
- Variables
- func InjectBolt(config viperjacket.Config) (database.Database, error)
- func InjectDefaultExplorerServer(config viperjacket.Config, blockchain blockchain.Blockchain) (explorerserver.ExplorerServer, error)
- func InjectDefaultRESTAPIServer(config viperjacket.Config, blockchain blockchain.Blockchain) (restapiserver.RESTAPIServer, error)
- func InjectOssiconesBlockchain(config viperjacket.Config, db database.Database) (blockchain.Blockchain, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var EagerInjectors = map[string]interface{}{}
View Source
var Injectors = map[string]interface{}{ "bolt": InjectBolt, "ossiconesblockchain": InjectOssiconesBlockchain, "defaultexplorerserver": InjectDefaultExplorerServer, "defaultrestapiserver": InjectDefaultRESTAPIServer, }
Dependency Injection List
injectors stores module_name(key) with injector_func(value) using map. For wiring, name of implement using in config with injector function.
Examples :
var injectors = map[string]interface{}{ "viperconfig": InjectViperConfig, "ossiconesblockchain": InjectOssiconesBlockchain, } var eagerInjectors = map[string]interface{}{ "defaultexplorerserver": InjectDefaultExplorerServer, "defaultrestapiserver": InjectDefaultRESTAPIServer, }
Functions ¶
func InjectBolt ¶
func InjectBolt(config viperjacket.Config) (database.Database, error)
InjectBolt injects dependencies and inits of Database.
func InjectDefaultExplorerServer ¶
func InjectDefaultExplorerServer( config viperjacket.Config, blockchain blockchain.Blockchain, ) (explorerserver.ExplorerServer, error)
InjectDefaultExplorerServer injects dependencies and inits of ExplorerServer.
func InjectDefaultRESTAPIServer ¶
func InjectDefaultRESTAPIServer( config viperjacket.Config, blockchain blockchain.Blockchain, ) (restapiserver.RESTAPIServer, error)
InjectDefaultRESTAPIServer injects dependencies and inits of APiServer.
func InjectOssiconesBlockchain ¶
func InjectOssiconesBlockchain(config viperjacket.Config, db database.Database) (blockchain.Blockchain, error)
InjectOssiconesBlockchain injects dependencies and inits of Blockchain.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.