Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListTypes ¶
ListTypes queries the global component registry. Without any options, returns all types. This will copy the registry, so using the options to filter the returned types is preferred.
func RegisterType ¶
RegisterType adds a type to the global component registry. This should not need to be called directly, as the component scanning mechanism should generate calls to this function.
Types ¶
type Option ¶
Option to the ListTypes function.
func AssignableTo ¶
AssignableTo provides the ability to filter registered types to those types that are assignable to the provided type, which will typically be a marker interface type, although any interface type will do.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry is captured as a type here so that you can stub out implementations of it in your tests.
func (*Registry) RegisterType ¶
RegisterType adds a type to the given registry.