di/registry/registry.go

12 lines
264 B
Go
Raw Normal View History

2017-12-03 10:55:10 +00:00
package registry
import "reflect"
type ComponentRegistry interface {
RegisterType(t reflect.Type, name string) error
RegisterFactory(i interface{}) error
GetInstance(t reflect.Type) (interface{}, error)
GetInstanceByName(name string) (interface{}, error)
}