Documentation ¶
Overview ¶
Package container includes the Container type, witch contains a collection of modules.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Container holds all modules registered.
func (*Container) Modules ¶
Modules returns all modules in the container. This method is used to scan for custom interfaces. For example, The database module use Modules to scan for database migrations.
m.container.Modules().Filter(func(p MigrationProvider) { for _, migration := range p.ProvideMigration() { if migration.Connection == "" { migration.Connection = "default" } if migration.Connection == connection { migrations.Collection = append(migrations.Collection, migration) } } })
Click to show internal directories.
Click to hide internal directories.