Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterMethods ¶
func RegisterMethods[H Registration, T Registerable[H]](registerable T)
RegisterMethods Register methods on Registerable T to be ran. Uses reflection to find methods that return Registration H. That Registration is then passed to and called by Registerable T's Register method.
func RegisterOrderedMethods ¶
func RegisterOrderedMethods[H Registration, T Registerable[H]](registerable T)
RegisterOrderedMethods Same as RegisterMethods uses an OrderedRegistration to order register calls.
Types ¶
type OrderedRegisterFn ¶
type OrderedRegisterFn func() (int, Registration)
OrderedRegisterFn signature of an OrderedRegisterable method.
type RegisterFn ¶
type RegisterFn func() Registration
RegisterFn signature of a Registerable method.
type Registerable ¶
type Registerable[H Registration] interface { Register(H) }
Registerable make a method Registerable. Good place to store any dependencies for use within your Registerable methods.
type Registration ¶
type Registration interface{}
Registration holds info to be registered and used within your code. Good place to store any information requied by the Registerable.