di/registry/definition.go

32 lines
514 B
Go
Raw Normal View History

2017-12-03 13:54:09 +00:00
package registry
2017-12-05 13:28:42 +00:00
import (
2017-12-06 00:48:03 +00:00
"fmt"
2017-12-05 13:28:42 +00:00
"reflect"
2017-12-03 13:54:09 +00:00
2017-12-05 13:28:42 +00:00
cda "git.loafle.net/commons_go/di/annotation"
)
type TypeDefinition struct {
2017-12-06 00:48:03 +00:00
FullName string
2017-12-05 10:02:41 +00:00
PkgName string
TypeName string
Type reflect.Type
RealType reflect.Type
2017-12-05 13:28:42 +00:00
Fields map[string]*FieldDefinition
}
type FieldDefinition struct {
PkgName string
TypeName string
Type reflect.Type
RealType reflect.Type
Annotations map[string]cda.Annotation
2017-12-03 13:54:09 +00:00
}
2017-12-06 00:48:03 +00:00
func FullName(pkgName, typeName string) string {
return fmt.Sprintf("%s/%s", pkgName, typeName)
}