Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerField ¶
type ContainerField struct {
Name string
TypeExpr string
Type types.Type
TagRaw string
InjectRaw string
Inject InjectTag
Position string
}
ContainerField represents a field within a container struct.
type ContainerSpec ¶
type ContainerSpec struct {
PkgPath string
PkgName string
Name string
Position string
Fields []ContainerField
}
ContainerSpec represents a discovered container struct.
func CollectContainers ¶
func CollectContainers(pkgs []*packages.Package) ([]ContainerSpec, error)
CollectContainers scans loaded packages and collects container structs.
type InjectTag ¶
type InjectTag struct {
Provider string
}
InjectTag represents a parsed `inject:"..."` struct tag.
type ProviderSpec ¶
type ProviderSpec struct {
PkgPath string
PkgName string
Name string
ResultType types.Type
ResultString string
ReturnError bool
Params []types.Type
Position string
}
ProviderSpec represents a discovered provider function.
func CollectProviders ¶
func CollectProviders(pkgs []*packages.Package) ([]ProviderSpec, error)
CollectProviders scans loaded packages and collects provider functions.
Rule: - Top-level functions only (func Foo(...)) - Exactly 1 result - Result type can be any named type, pointer to named type, or interface type - Parameters are recorded as dependency requirements
Click to show internal directories.
Click to hide internal directories.