Documentation ¶
Overview ¶
Package apis for common interfaces MIT License
Copyright (c) 2017 yroffin ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package interfaces for common interfaces MIT License
Copyright (c) 2017 yroffin ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package apis for common apis MIT License
Copyright (c) 2017 yroffin ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package apis for common interfaces MIT License
Copyright (c) 2017 yroffin ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- Variables
- type Bean
- type IBean
- type IManager
- type IService
- type Manager
- func (m *Manager) Boot(box PackManager, notFound string) error
- func (m *Manager) ForEach(iter func(interface{}))
- func (m *Manager) GetBean(name string) interface{}
- func (m *Manager) GetBeanNames() []string
- func (m *Manager) Init() error
- func (m *Manager) Inject(name string, intf interface{}) error
- func (m *Manager) New(name string) IManager
- func (m *Manager) Register(name string, b IBean) error
- type PackManager
- type Service
Constants ¶
This section is empty.
Variables ¶
var ( // Helper manage beans Helper = (&Manager{}).New("manager") )
Functions ¶
This section is empty.
Types ¶
type Bean ¶
type Bean struct {
Name string
}
Bean interface
func (*Bean) PostConstruct ¶
PostConstruct Init this bean
type IBean ¶
type IBean interface { Init() error GetName() string SetName(name string) PostConstruct(string) error Validate(string) error }
IBean interface
type IManager ¶
type IManager interface { IService // Method Register(name string, b IBean) error Boot(PackManager, string) error GetBean(name string) interface{} GetBeanNames() []string ForEach(func(interface{})) }
IManager interface
type Manager ¶
type Manager struct { *Service // Bean registry ArrayOfBeans []interface{} ArrayOfBeanNames []string // Bean registry MapOfBeans map[string]interface{} }
Manager interface
func (*Manager) Boot ¶
func (m *Manager) Boot(box PackManager, notFound string) error
Boot Init this manager
func (*Manager) ForEach ¶
func (m *Manager) ForEach(iter func(interface{}))
ForEach interate on beans
type PackManager ¶
PackManager implements packager
type Service ¶
type Service struct { // members *Bean }
Service base class
func (*Service) PostConstruct ¶
PostConstruct this API