Documentation
¶
Index ¶
- Constants
- func AllowCircularReferences(enable bool)
- func Banner(banner string)
- func BindArg(fn interface{}, args []Arg, skip int) (*gs_arg.Callable, error)
- func BootAccept(bd *gs.UnregisteredBean) *gs.RegisteredBean
- func BootConfig() *gs_conf.BootConfig
- func BootGroup(fn func(p gs.Properties) ([]*gs.UnregisteredBean, error))
- func BootObject(i interface{}) *gs.RegisteredBean
- func BootProvide(ctor interface{}, args ...gs.Arg) *gs.RegisteredBean
- func BootRunner(objOrCtor interface{}, ctorArgs ...gs.Arg) *gs.RegisteredBean
- func Config() *gs_conf.AppConfig
- func ForceAutowireIsNullable(enable bool)
- func Group(fn func(p Properties) ([]*UnregisteredBean, error))
- func IndexArg(n int, arg Arg) gs_arg.IndexArg
- func MustBindArg(fn interface{}, args ...Arg) *gs_arg.Callable
- func NilArg() gs_arg.ValueArg
- func OptionArg(fn interface{}, args ...Arg) *gs_arg.OptionArg
- func RefreshProperties(p Properties) error
- func Run() error
- func ShutDown(msg ...string)
- func Start() error
- func Stop()
- func ValueArg(v interface{}) gs_arg.ValueArg
- type AppContext
- type AppRunner
- type AppServer
- type Arg
- type BeanDestroy
- type BeanInit
- type BeanSelector
- type CondContext
- type Condition
- type Conditional
- func OnBean(selector BeanSelector) *Conditional
- func OnExpression(expression string) *Conditional
- func OnMatches(fn func(ctx CondContext) (bool, error)) *Conditional
- func OnMissingBean(selector BeanSelector) *Conditional
- func OnMissingProperty(name string) *Conditional
- func OnProfile(profile string) *Conditional
- func OnProperty(name string, options ...PropertyOption) *Conditional
- func OnSingleBean(selector BeanSelector) *Conditional
- type Context
- type ContextAware
- type Dync
- type Properties
- type PropertyOption
- type RegisteredBean
- type UnregisteredBean
Constants ¶
View Source
const ( Version = "go-spring@v1.1.3" Website = "https://go-spring.com/" )
Variables ¶
This section is empty.
Functions ¶
func AllowCircularReferences ¶ added in v1.2.0
func AllowCircularReferences(enable bool)
func BootAccept ¶
func BootAccept(bd *gs.UnregisteredBean) *gs.RegisteredBean
func BootConfig ¶
func BootConfig() *gs_conf.BootConfig
func BootGroup ¶
func BootGroup(fn func(p gs.Properties) ([]*gs.UnregisteredBean, error))
func BootObject ¶
func BootObject(i interface{}) *gs.RegisteredBean
func BootProvide ¶
func BootProvide(ctor interface{}, args ...gs.Arg) *gs.RegisteredBean
func BootRunner ¶
func BootRunner(objOrCtor interface{}, ctorArgs ...gs.Arg) *gs.RegisteredBean
func ForceAutowireIsNullable ¶ added in v1.2.0
func ForceAutowireIsNullable(enable bool)
func Group ¶ added in v1.2.3
func Group(fn func(p Properties) ([]*UnregisteredBean, error))
func MustBindArg ¶
MustBindArg 为 Option 方法绑定运行时参数。
func RefreshProperties ¶ added in v1.2.0
func RefreshProperties(p Properties) error
Types ¶
type AppContext ¶
type AppContext = gs_app.AppContext
type BeanDestroy ¶
type BeanDestroy = gs_bean.BeanDestroy
type BeanSelector ¶ added in v1.2.0
type BeanSelector = gs.BeanSelector
type CondContext ¶ added in v1.2.0
type CondContext = gs.CondContext
type Condition ¶ added in v1.2.0
func And ¶ added in v1.2.0
And returns a Condition that returns true when all the given Conditions return true.
func None ¶ added in v1.2.0
None returns a Condition that returns true when none of the given Conditions returns true.
type Conditional ¶
type Conditional = gs_cond.Conditional
func OnBean ¶ added in v1.2.0
func OnBean(selector BeanSelector) *Conditional
func OnExpression ¶ added in v1.2.0
func OnExpression(expression string) *Conditional
func OnMatches ¶
func OnMatches(fn func(ctx CondContext) (bool, error)) *Conditional
func OnMissingBean ¶ added in v1.2.0
func OnMissingBean(selector BeanSelector) *Conditional
func OnMissingProperty ¶ added in v1.2.0
func OnMissingProperty(name string) *Conditional
func OnProfile ¶
func OnProfile(profile string) *Conditional
func OnProperty ¶
func OnProperty(name string, options ...PropertyOption) *Conditional
func OnSingleBean ¶ added in v1.2.0
func OnSingleBean(selector BeanSelector) *Conditional
type ContextAware ¶ added in v1.1.1
type ContextAware = gs.ContextAware
type Properties ¶
type Properties = gs.Properties
type PropertyOption ¶
type PropertyOption = gs_cond.PropertyOption
func HavingValue ¶
func HavingValue(havingValue string) PropertyOption
func MatchIfMissing ¶
func MatchIfMissing() PropertyOption
type RegisteredBean ¶ added in v1.2.0
type RegisteredBean = gs.RegisteredBean
func Provide ¶
func Provide(ctor interface{}, args ...Arg) *RegisteredBean
Provide 参考 Container.Provide 的解释。
func Runner ¶ added in v1.2.0
func Runner(objOrCtor interface{}, ctorArgs ...Arg) *RegisteredBean
func Server ¶ added in v1.2.0
func Server(objOrCtor interface{}, ctorArgs ...Arg) *RegisteredBean
type UnregisteredBean ¶
type UnregisteredBean = gs.UnregisteredBean
Click to show internal directories.
Click to hide internal directories.