Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Provide ¶
Provide is used to provide a type T to the container. The provided type T must be a struct or a pointer to a struct, or a interface
func RegisterFlagBinder ¶
Types ¶
type Context ¶
type Context interface {
Path() string
// contains filtered or unexported methods
}
Context defines the context for building objects, as well as getting dependencies and getting the context itself.
type InjectBuilder ¶
type InjectBuilder[T any, K any] struct { Opt K `flag:""` // contains filtered or unexported fields }
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithFlagset ¶
func WithImplement ¶
WithImplement use to specify the implementation of interface the first type is interface, the second type is implementation
func WithOverride ¶
func WithOverride() Option
func WithSelect ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds all the registered constructors
func GetRegistry ¶
func GetRegistry() Registry
func (Registry) ValidateFlags ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.