Documentation ¶
Index ¶
- type Meta
- type Module
- func (m *Module) AddAsser(assers ...as.Asser) *Module
- func (m *Module) AddProvideHook(hooks ...ProvideHook) *Module
- func (m *Module) Invoke(ctr ...any) *Module
- func (m *Module) Merge(sub ...*SubModule) *Module
- func (m *Module) Meta(usedModules ...string) Meta
- func (m *Module) Name() string
- func (m *Module) Provide(ctr ...any) *Module
- type ProvideHook
- type SubModule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Meta ¶
type Meta struct { Name string Provides []any Invokes []any ProvideHooks []ProvideHook Depends []string }
Meta is the meta data of a module
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module represents a group of provide and invoke functions. It makes it possible to group functionalities with modules. These functionalities can be imported whenever needed
func (*Module) AddProvideHook ¶
func (m *Module) AddProvideHook(hooks ...ProvideHook) *Module
AddProvideHook adds provide hook
type ProvideHook ¶
ProvideHook represents a pre-Provide step so that constructors can be manipulated or grouped
type SubModule ¶
type SubModule struct {
// contains filtered or unexported fields
}
SubModule represents a simple provide pool partition of a module can not be used as a standalone module with chaki. It has to be merged with another module with
func NewSubModule ¶
func NewSubModule() *SubModule
func (*SubModule) AddProvideHook ¶
func (sm *SubModule) AddProvideHook(hooks ...ProvideHook) *SubModule
Click to show internal directories.
Click to hide internal directories.