Documentation ¶
Overview ¶
Package resolver handles resolving dependencies
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InjectionTarget ¶
type InjectionTarget struct { MethodName string Type types.Type Name *types.Named IsPointer bool HasError bool }
InjectionTarget represents something that should be injected
type ModuleResolvedType ¶
type ModuleResolvedType struct { Module *structs.Struct Method *types.Func Name *types.Named IsPointer bool HasError bool }
ModuleResolvedType represents a type that has been resolved via a module.
func (*ModuleResolvedType) DebugInfo ¶
func (m *ModuleResolvedType) DebugInfo() string
DebugInfo implements ResolvedType DebugInfo
type ResolveResult ¶
type ResolveResult struct { TargetInterfaceName string // Name of the Target interface Targets []*InjectionTarget // List of injection targets Providers map[string]ResolvedType // Map of type to the provider of that type Bindings map[string]*types.Named // Map of interface to concrete type }
ResolveResult is the result of ResolveComponentModules
func ResolveComponentModules ¶
func ResolveComponentModules( fileSet *token.FileSet, componentInterface *structs.Interface, ) ( *ResolveResult, error, )
ResolveComponentModules resolves the modules for the component interface. The return types are: - List of struct modules (used to provide concrete types) - List of interface modules (used to bind interfaces to implementations)
type ResolvedType ¶
type ResolvedType interface {
DebugInfo() string
}
ResolvedType is an interface that represents a type provided by an injection source. Currently, the only injection source is via a provider module.