Documentation
¶
Index ¶
- type ArgType
- type Base
- type DependencyTracker
- type Field
- type Holder
- type Interceptor
- type Meta
- type Property
- func (n *Property) AddArg(t ArgType, val ...string)
- func (n *Property) Args() TagArg
- func (n *Property) ID() string
- func (n *Property) Inject(metas []*Meta) error
- func (n *Property) IsRequired() bool
- func (n *Property) SetArg(t ArgType, val ...string)
- func (n *Property) SetConfiguration(path string, configValue any)
- func (n *Property) String() string
- func (n *Property) Unmarshall(configValue any) error
- type PropertyManager
- func (pm *PropertyManager) GetAllProperties() []*Property
- func (pm *PropertyManager) GetComponentProperties() []*Property
- func (pm *PropertyManager) GetConfigurationProperties() []*Property
- func (pm *PropertyManager) GetProperties(t PropertyType) []*Property
- func (pm *PropertyManager) SetProperties(properties ...*Property)
- type PropertyType
- type TagArg
- func (m TagArg) Add(argType ArgType, val ...string)
- func (m TagArg) Find(argType ArgType) ([]string, bool)
- func (m TagArg) ForEach(f func(argType ArgType, args []string))
- func (m TagArg) Has(argType ArgType, wants ...string) bool
- func (m TagArg) Parse(tag string) string
- func (m TagArg) Set(argType ArgType, val ...string)
- func (m TagArg) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type DependencyTracker ¶ added in v1.6.0
type DependencyTracker struct {
Dependent []*Meta
// contains filtered or unexported fields
}
func (*DependencyTracker) GetDependents ¶ added in v1.6.0
func (dt *DependencyTracker) GetDependents() []string
type Holder ¶
func NewEmbedHolder ¶
type Interceptor ¶
type Meta ¶
type Meta struct {
*Base
PropertyManager
DependencyTracker
ProxyMeta *Meta
Raw interface{}
Fields []*Field
// contains filtered or unexported fields
}
func CreateProxy ¶
func SelectBestCandidate ¶ added in v1.6.0
SelectBestCandidate picks the best match from multiple Meta candidates using the priority: WirePrimary > non-alias > first element.
func (*Meta) IsPrototype ¶ added in v1.6.0
func (*Meta) IsSingleton ¶
type Property ¶
type Property struct {
*Field
PropertyType PropertyType
Tag, TagStr string
TagVal string
Injects []*Meta
Configurations map[string]any
// contains filtered or unexported fields
}
func NewProperty ¶
func NewProperty(field *Field, propType PropertyType, tag, tagVal string) *Property
func (*Property) IsRequired ¶ added in v1.5.12
func (*Property) SetConfiguration ¶ added in v1.5.7
func (*Property) Unmarshall ¶ added in v1.5.7
type PropertyManager ¶ added in v1.6.0
type PropertyManager struct {
// contains filtered or unexported fields
}
func (*PropertyManager) GetAllProperties ¶ added in v1.6.0
func (pm *PropertyManager) GetAllProperties() []*Property
func (*PropertyManager) GetComponentProperties ¶ added in v1.6.0
func (pm *PropertyManager) GetComponentProperties() []*Property
func (*PropertyManager) GetConfigurationProperties ¶ added in v1.6.0
func (pm *PropertyManager) GetConfigurationProperties() []*Property
func (*PropertyManager) GetProperties ¶ added in v1.6.0
func (pm *PropertyManager) GetProperties(t PropertyType) []*Property
func (*PropertyManager) SetProperties ¶ added in v1.6.0
func (pm *PropertyManager) SetProperties(properties ...*Property)
type PropertyType ¶
type PropertyType string
const ( PropertyTypeConfiguration PropertyType = "Configuration" PropertyTypeComponent PropertyType = "Component" )
Click to show internal directories.
Click to hide internal directories.