Documentation ¶
Index ¶
- Variables
- func AddTag(tag Tag)
- func IntoObject(object interface{}) error
- func IntoObjectValue(object reflect.Value) error
- func SetInstance(i cmap.ConcurrentMap)
- type BaseTag
- func (t *BaseTag) Decode(object reflect.Value, field reflect.StructField, tag string) (retVal interface{})
- func (t *BaseTag) Init(systemConfig *system.Configuration, configurations cmap.ConcurrentMap)
- func (t *BaseTag) IsSingleton() bool
- func (t *BaseTag) ParseProperties(tag string) cmap.ConcurrentMap
- func (t *BaseTag) Properties() cmap.ConcurrentMap
- type Tag
Constants ¶
This section is empty.
Variables ¶
View Source
var ( InstanceContainerIsNilError = errors.New("[inject] instance container is nil") NotImplementedError = errors.New("[inject] interface is not implemented") InvalidObjectError = errors.New("[inject] invalid object") UnsupportedInjectionTypeError = errors.New("[inject] unsupported injection type") IllegalArgumentError = errors.New("[inject] input argument type can not be the same as receiver") TagIsAlreadyExistError = errors.New("[inject] tag is already exist") TagIsNilError = errors.New("[inject] tag is nil") InvalidTagNameError = errors.New("[inject] invalid tag name, e.g. exampleTag") SystemConfigurationError = errors.New("[inject] system is not configured") )
Functions ¶
func IntoObject ¶
func IntoObject(object interface{}) error
IntoObject injects instance into the tagged field with `inject:"instanceName"`
func IntoObjectValue ¶ added in v0.5.0
IntoObject injects instance into the tagged field with `inject:"instanceName"`
func SetInstance ¶ added in v0.5.0
func SetInstance(i cmap.ConcurrentMap)
Types ¶
type BaseTag ¶ added in v0.3.0
type BaseTag struct {
// contains filtered or unexported fields
}
func (*BaseTag) Decode ¶ added in v0.3.0
func (*BaseTag) Init ¶ added in v0.5.0
func (t *BaseTag) Init(systemConfig *system.Configuration, configurations cmap.ConcurrentMap)
func (*BaseTag) ParseProperties ¶ added in v0.3.0
func (t *BaseTag) ParseProperties(tag string) cmap.ConcurrentMap
func (*BaseTag) Properties ¶ added in v0.3.0
func (t *BaseTag) Properties() cmap.ConcurrentMap
type Tag ¶ added in v0.3.0
type Tag interface { Init(systemConfig *system.Configuration, configurations cmap.ConcurrentMap) Decode(object reflect.Value, field reflect.StructField, tag string) (retVal interface{}) Properties() cmap.ConcurrentMap IsSingleton() bool }
Click to show internal directories.
Click to hide internal directories.