di/registry/definition.go
crusader 0a16fb1bd1 ing
2017-12-06 09:48:03 +09:00

32 lines
514 B
Go

package registry
import (
"fmt"
"reflect"
cda "git.loafle.net/commons_go/di/annotation"
)
type TypeDefinition struct {
FullName string
PkgName string
TypeName string
Type reflect.Type
RealType reflect.Type
Fields map[string]*FieldDefinition
}
type FieldDefinition struct {
PkgName string
TypeName string
Type reflect.Type
RealType reflect.Type
Annotations map[string]cda.Annotation
}
func FullName(pkgName, typeName string) string {
return fmt.Sprintf("%s/%s", pkgName, typeName)
}