Documentation
¶
Index ¶
- func Config(conf *Configuration)
- func CreateInjector(bs providerstore) (*injector, error)
- func FuncInterceptor(fptr interface{}, funIntercept func(in []reflect.Value) []reflect.Value) reflect.Value
- func GetBeanNameAndKind(bean interface{}) (string, reflect.Kind)
- func Hash(input string) uint64
- func RegisterModules(mods ...Module) providerstore
- type AppCtx
- type ApplicationContext
- type BaseModuleContext
- type BeanCtxBinder
- type BeanProxy
- type Binder
- type Builder
- type Configuration
- type CtxBinder
- type InjectAwaredSupport
- type InjectingState
- type Injector
- type InterfaceBuilder
- type Module
- type ModuleContext
- type RegisterBean
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateInjector ¶
func CreateInjector(bs providerstore) (*injector, error)
CreateInjector create injecto for object
func FuncInterceptor ¶
func FuncInterceptor(fptr interface{}, funIntercept func(in []reflect.Value) []reflect.Value) reflect.Value
FuncInterceptor define interceptor function handle
func GetBeanNameAndKind ¶ added in v0.1.9
GetBeanNameAndKind get bean interface
func RegisterModules ¶
func RegisterModules(mods ...Module) providerstore
RegisterModules create function handle for beanCtx
Types ¶
type AppCtx ¶
type AppCtx struct {
// contains filtered or unexported fields
}
AppCtx define the application context
func (*AppCtx) GetInstance ¶
GetInstance the public instance for get application
type ApplicationContext ¶
type ApplicationContext interface {
// ---- get application method ----
GetInstance(itypes ...interface{}) interface{}
}
ApplicationContext --- create application context ----
type BaseModuleContext ¶
type BaseModuleContext struct {
Provider *register
}
BaseModuleContext define beanCtx object
func (*BaseModuleContext) GetRegister ¶
func (myself *BaseModuleContext) GetRegister() *register
GetRegister get base register define
type BeanCtxBinder ¶
type BeanCtxBinder struct {
// contains filtered or unexported fields
}
BeanCtxBinder defined appp store
func (*BeanCtxBinder) Bind ¶
func (myself *BeanCtxBinder) Bind(froms ...interface{}) Builder
Bind ... bind all interface
func (*BeanCtxBinder) BindType ¶
func (myself *BeanCtxBinder) BindType(froms ...interface{}) Builder
BindType bind type in builder
func (*BeanCtxBinder) String ¶
func (myself *BeanCtxBinder) String() string
*
- defined method binding
- implement function for inject api
type BeanProxy ¶ added in v0.1.8
type BeanProxy struct {
// contains filtered or unexported fields
}
*
- defin all project object interface
func (*BeanProxy) CreateInjectingState ¶ added in v0.1.8
func (myself *BeanProxy) CreateInjectingState() *InjectingState
type Binder ¶
type Binder interface { fmt.Stringer // ---- bind provided handler for hag ----- Provide(handlers ...interface{}) error // ---- set register bean --- InjectBean(funcs interface{}) error // ---- bind invoke handler Invoke(handlers ...interface{}) error }
Binder create beanCtx interface
type Configuration ¶
type Configuration struct {
// contains filtered or unexported fields
}
Configuration get the annotaion config
func (*Configuration) SetInjectMethodPrefix ¶
func (myself *Configuration) SetInjectMethodPrefix(method ...string)
SetInjectMethodPrefix set inject method prefix
type CtxBinder ¶
type CtxBinder interface {
Bind(itypes ...interface{}) Builder
}
CtxBinder create application inject
type InjectAwaredSupport ¶
type InjectAwaredSupport interface {
// ProvideMethod defined provide method
ProvideMethod() []interface{}
}
InjectAwaredSupport dev support api
type InjectingState ¶ added in v0.1.8
type InjectingState struct {
// contains filtered or unexported fields
}
func NewInjectingState ¶ added in v0.1.8
func (*InjectingState) DoWork ¶ added in v0.1.8
func (myself *InjectingState) DoWork() error
func (*InjectingState) SetDigContainer ¶ added in v0.1.8
func (myself *InjectingState) SetDigContainer(digContainer *dig.Container)
type Injector ¶
type Injector interface { /** * create injector application */ Execute(funcs ...interface{}) error }
Injector is setting for injecto ioc handle
type InterfaceBuilder ¶
type InterfaceBuilder interface { Builder }
InterfaceBuilder is the return value when binding an interface from a Module.
type ModuleContext ¶
type ModuleContext interface {
GetRegister() *register
}
ModuleContext define module context
type RegisterBean ¶
type RegisterBean struct { // define base bean Bean interface{} ProvideFun interface{} }
RegisterBean define register bean