Documentation ¶
Index ¶
- type NormalApp
- type NormalAppIOCInterface
- type Service
- type ServiceImpl1
- type ServiceImpl1IOCInterface
- type ServiceImpl2
- type ServiceImpl2IOCInterface
- type ServiceStruct
- type ServiceStructIOCInterface
- type SingletonApp
- type SingletonAppIOCInterface
- type ThisServiceImpl1
- type ThisServiceImpl2
- type ThisServiceStruct
- type ThisSingletonApp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NormalApp ¶
type NormalApp struct { // inject main.ServiceImpl1 pointer to Service interface with proxy wrapper ServiceImpl1 Service `normal:"github.com/alibaba/ioc-golang/test/stress/autowire.ServiceImpl1"` // inject main.ServiceImpl2 pointer to Service interface with proxy wrapper ServiceImpl2 Service `normal:"github.com/alibaba/ioc-golang/test/stress/autowire.ServiceImpl2"` // inject ServiceImpl1 pointer to Service1 's own interface with proxy wrapper // this interface belongs to ServiceImpl1, there is no need to mark 'main.ServiceImpl1' in tag Service1OwnInterface ServiceImpl1IOCInterface `normal:""` // inject ServiceStruct struct pointer ServiceStruct *ServiceStruct `normal:""` }
func GetNormalApp ¶
type NormalAppIOCInterface ¶
func GetNormalAppIOCInterface ¶
func GetNormalAppIOCInterface() (NormalAppIOCInterface, error)
type ServiceImpl1 ¶
type ServiceImpl1 struct { }
func GetServiceImpl1 ¶
func GetServiceImpl1() (*ServiceImpl1, error)
func GetServiceImpl1Singleton ¶
func GetServiceImpl1Singleton() (*ServiceImpl1, error)
func (*ServiceImpl1) GetHelloString ¶
func (s *ServiceImpl1) GetHelloString(name string) string
type ServiceImpl1IOCInterface ¶
func GetServiceImpl1IOCInterface ¶
func GetServiceImpl1IOCInterface() (ServiceImpl1IOCInterface, error)
func GetServiceImpl1IOCInterfaceSingleton ¶
func GetServiceImpl1IOCInterfaceSingleton() (ServiceImpl1IOCInterface, error)
type ServiceImpl2 ¶
type ServiceImpl2 struct { }
func GetServiceImpl2 ¶
func GetServiceImpl2() (*ServiceImpl2, error)
func GetServiceImpl2Singleton ¶
func GetServiceImpl2Singleton() (*ServiceImpl2, error)
func (*ServiceImpl2) GetHelloString ¶
func (s *ServiceImpl2) GetHelloString(name string) string
type ServiceImpl2IOCInterface ¶
func GetServiceImpl2IOCInterface ¶
func GetServiceImpl2IOCInterface() (ServiceImpl2IOCInterface, error)
func GetServiceImpl2IOCInterfaceSingleton ¶
func GetServiceImpl2IOCInterfaceSingleton() (ServiceImpl2IOCInterface, error)
type ServiceStruct ¶
type ServiceStruct struct { }
func GetServiceStruct ¶
func GetServiceStruct() (*ServiceStruct, error)
func GetServiceStructSingleton ¶
func GetServiceStructSingleton() (*ServiceStruct, error)
func (*ServiceStruct) GetString ¶
func (s *ServiceStruct) GetString(name string) string
type ServiceStructIOCInterface ¶
func GetServiceStructIOCInterface ¶
func GetServiceStructIOCInterface() (ServiceStructIOCInterface, error)
func GetServiceStructIOCInterfaceSingleton ¶
func GetServiceStructIOCInterfaceSingleton() (ServiceStructIOCInterface, error)
type SingletonApp ¶
type SingletonApp struct { // inject main.ServiceImpl1 pointer to Service interface with proxy wrapper ServiceImpl1 Service `singleton:"github.com/alibaba/ioc-golang/test/stress/autowire.ServiceImpl1"` // inject main.ServiceImpl2 pointer to Service interface with proxy wrapper ServiceImpl2 Service `singleton:"github.com/alibaba/ioc-golang/test/stress/autowire.ServiceImpl2"` // inject ServiceImpl1 pointer to Service1 's own interface with proxy wrapper // this interface belongs to ServiceImpl1, there is no need to mark 'main.ServiceImpl1' in tag Service1OwnInterface ServiceImpl1IOCInterface `singleton:""` // inject ServiceStruct struct pointer ServiceStruct *ServiceStruct `singleton:""` }
func GetSingletonAppSingleton ¶
func GetSingletonAppSingleton() (*SingletonApp, error)
func (*SingletonApp) RunTest ¶
func (s *SingletonApp) RunTest(t *testing.T)
type SingletonAppIOCInterface ¶
func GetSingletonAppIOCInterfaceSingleton ¶
func GetSingletonAppIOCInterfaceSingleton() (SingletonAppIOCInterface, error)
type ThisServiceImpl1 ¶ added in v1.0.1
type ThisServiceImpl1 struct { }
func (*ThisServiceImpl1) This ¶ added in v1.0.1
func (t *ThisServiceImpl1) This() ServiceImpl1IOCInterface
type ThisServiceImpl2 ¶ added in v1.0.1
type ThisServiceImpl2 struct { }
func (*ThisServiceImpl2) This ¶ added in v1.0.1
func (t *ThisServiceImpl2) This() ServiceImpl2IOCInterface
type ThisServiceStruct ¶ added in v1.0.1
type ThisServiceStruct struct { }
func (*ThisServiceStruct) This ¶ added in v1.0.1
func (t *ThisServiceStruct) This() ServiceStructIOCInterface
type ThisSingletonApp ¶ added in v1.0.1
type ThisSingletonApp struct { }
func (*ThisSingletonApp) This ¶ added in v1.0.1
func (t *ThisSingletonApp) This() SingletonAppIOCInterface
Click to show internal directories.
Click to hide internal directories.