Documentation
¶
Index ¶
- Constants
- Variables
- func AllowCircularReferences(enable bool)
- func Banner(banner string)
- func BindArg(fn interface{}, args ...Arg) *gs_arg.Callable
- func Boot() *gs_app.Boot
- func Config() *gs_conf.AppConfig
- func ForceAutowireIsNullable(enable bool)
- func GroupRegister(fn func(p Properties) ([]*BeanDefinition, error))
- func IndexArg(n int, arg Arg) gs_arg.IndexArg
- func NilArg() gs_arg.ValueArg
- func OnProperty(name string) gs_cond.OnPropertyInterface
- func OptionArg(fn interface{}, args ...Arg) *gs_arg.OptionArg
- func RefreshProperties(p Properties) error
- func RegisterExpressFunc(name string, fn interface{})
- func Run() error
- func ShutDown(msg ...string)
- func Start() error
- func Stop()
- func TagArg(tag string) gs_arg.TagArg
- func ValueArg(v interface{}) gs_arg.ValueArg
- type AppContext
- type AppRunner
- type AppServer
- type Arg
- type BeanDefinition
- type BeanDestroyFunc
- type BeanDestroyInterface
- type BeanInitFunc
- type BeanInitInterface
- type BeanSelector
- type CondBean
- type CondContext
- type CondFunc
- type Condition
- func And(conditions ...Condition) Condition
- func None(conditions ...Condition) Condition
- func Not(c Condition) Condition
- func OnBean(s BeanSelector) Condition
- func OnExpression(expression string) Condition
- func OnFunc(fn CondFunc) Condition
- func OnMissingBean(s BeanSelector) Condition
- func OnMissingProperty(name string) Condition
- func OnProfile(profile string) Condition
- func OnSingleBean(s BeanSelector) Condition
- func Or(conditions ...Condition) Condition
- type Context
- type ContextAware
- type Dync
- type Properties
- type Refreshable
- type RegisteredBean
Constants ¶
const ( Version = "go-spring@v1.2.0.rc" Website = "https://go-spring.com/" )
Variables ¶
var NewBean = gs_core.NewBean
NewBean creates a new BeanDefinition.
Functions ¶
func AllowCircularReferences ¶ added in v1.2.0
func AllowCircularReferences(enable bool)
AllowCircularReferences enables or disables circular references between beans.
func ForceAutowireIsNullable ¶ added in v1.2.0
func ForceAutowireIsNullable(enable bool)
ForceAutowireIsNullable forces autowire to be nullable.
func GroupRegister ¶ added in v1.2.0
func GroupRegister(fn func(p Properties) ([]*BeanDefinition, error))
GroupRegister registers a group of bean definitions.
func OnProperty ¶
func OnProperty(name string) gs_cond.OnPropertyInterface
OnProperty creates a Condition based on a property name and options.
func RefreshProperties ¶ added in v1.2.0
func RefreshProperties(p Properties) error
RefreshProperties refreshes the app configuration.
func RegisterExpressFunc ¶ added in v1.2.0
func RegisterExpressFunc(name string, fn interface{})
RegisterExpressFunc registers a custom expression function.
Types ¶
type AppContext ¶
type AppContext = gs_app.AppContext
type BeanDefinition ¶
type BeanDefinition = gs.BeanDefinition
type BeanDestroyFunc ¶ added in v1.2.0
type BeanDestroyFunc = gs.BeanDestroyFunc
type BeanDestroyInterface ¶
type BeanDestroyInterface = gs.BeanDestroyInterface
type BeanInitFunc ¶ added in v1.2.0
type BeanInitFunc = gs.BeanInitFunc
type BeanInitInterface ¶
type BeanInitInterface = gs.BeanInitInterface
type BeanSelector ¶ added in v1.2.0
type BeanSelector = gs.BeanSelector
func BeanSelectorForType ¶
func BeanSelectorForType[T any]() BeanSelector
BeanSelectorForType returns a BeanSelector for the given type.
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 creates a Condition that is true if all the given Conditions are true.
func None ¶ added in v1.2.0
None creates a Condition that is true if none of the given Conditions are true.
func OnBean ¶ added in v1.2.0
func OnBean(s BeanSelector) Condition
OnBean creates a Condition based on a BeanSelector.
func OnExpression ¶ added in v1.2.0
OnExpression creates a Condition based on a custom expression.
func OnMissingBean ¶ added in v1.2.0
func OnMissingBean(s BeanSelector) Condition
OnMissingBean creates a Condition for when a specific bean is missing.
func OnMissingProperty ¶ added in v1.2.0
OnMissingProperty creates a Condition that checks for a missing property.
func OnSingleBean ¶ added in v1.2.0
func OnSingleBean(s BeanSelector) Condition
OnSingleBean creates a Condition for when only one instance of a bean exists.
type ContextAware ¶ added in v1.1.1
type ContextAware = gs.ContextAware
type Properties ¶
type Properties = gs.Properties
type Refreshable ¶
type Refreshable = gs.Refreshable
type RegisteredBean ¶ added in v1.2.0
type RegisteredBean = gs.RegisteredBean
func Object ¶
func Object(i interface{}) *RegisteredBean
Object registers a bean definition for a given object.
func Provide ¶
func Provide(ctor interface{}, args ...Arg) *RegisteredBean
Provide registers a bean definition for a given constructor.
func Register ¶ added in v1.2.0
func Register(b *BeanDefinition) *RegisteredBean
Register registers a bean definition.
func Runner ¶ added in v1.2.0
func Runner(objOrCtor interface{}, ctorArgs ...Arg) *RegisteredBean
Runner registers a bean definition for an AppRunner.
func Server ¶ added in v1.2.0
func Server(objOrCtor interface{}, ctorArgs ...Arg) *RegisteredBean
Server registers a bean definition for an AppServer.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
gs
Package gs provides all the concepts required for Go-Spring implementation.
|
Package gs provides all the concepts required for Go-Spring implementation. |
|
gs_app
Package gs_app provides a framework for building and managing Go-Spring applications.
|
Package gs_app provides a framework for building and managing Go-Spring applications. |
|
gs_arg
Package gs_arg provides a set of tools for working with function arguments.
|
Package gs_arg provides a set of tools for working with function arguments. |
|
gs_bean
Package gs_bean provides the bean definition for the Go-Spring framework.
|
Package gs_bean provides the bean definition for the Go-Spring framework. |
|
gs_cond
Package gs_cond provides a set of conditions that can be used for evaluating and combining logical conditions in a flexible way.
|
Package gs_cond provides a set of conditions that can be used for evaluating and combining logical conditions in a flexible way. |
|
gs_dync
Package gs_dync provides dynamic properties and refreshable objects.
|
Package gs_dync provides dynamic properties and refreshable objects. |