basedi

package
v1.0.1-rel-01 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: AFL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Container

func Container() *beanContainer

func FindBean

func FindBean(name string) baseiface.ISingleton

func FindBeanGeneral

func FindBeanGeneral[T baseiface.IbaseProxy]() T

func FindBeanOk

func FindBeanOk(name string) (baseiface.ISingleton, bool)

func FindBeanOnlyOk

func FindBeanOnlyOk(name string) (baseiface.ISingleton, bool)

func FindBeanProxy

func FindBeanProxy(name string) baseiface.IbaseProxy

func LoadAllBeanSingle

func LoadAllBeanSingle[T baseiface.ISingleton]() []T

func LoadAllBeanSingles

func LoadAllBeanSingles[T any]() []baseiface.ISingleton

func LoadBeanSingle

func LoadBeanSingle(name string) (baseiface.ISingleton, bool)

func RegisterBean

func RegisterBean(name string, bean baseiface.ISingleton) error

func RegisterBeanSingle

func RegisterBeanSingle(name string, bean baseiface.ISingleton) error

func RegisterLoadBean

func RegisterLoadBean(name string, loadbean baseiface.LoadBean) error

Types

type BeanFactroy

type BeanFactroy[T baseiface.IbaseProxy] struct{}

func NewBeanFactroy

func NewBeanFactroy[T baseiface.IbaseProxy]() *BeanFactroy[T]

func (*BeanFactroy[T]) Autowired

func (self *BeanFactroy[T]) Autowired(some any) error

func (*BeanFactroy[T]) FindBeanGeneral

func (self *BeanFactroy[T]) FindBeanGeneral() (T, error)

func (*BeanFactroy[T]) FindStructFields

func (self *BeanFactroy[T]) FindStructFields(stru any) []reflect.StructField

func (*BeanFactroy[T]) FindTypeName

func (self *BeanFactroy[T]) FindTypeName() string

func (*BeanFactroy[T]) FindTypePkgName

func (self *BeanFactroy[T]) FindTypePkgName() string

func (*BeanFactroy[T]) FindTypeStru

func (self *BeanFactroy[T]) FindTypeStru(value any) reflect.Type

func (*BeanFactroy[T]) IfNilPtrChild

func (self *BeanFactroy[T]) IfNilPtrChild(Stru any, fieldName string) bool

func (*BeanFactroy[T]) IfPtrNil

func (self *BeanFactroy[T]) IfPtrNil(v any) bool

func (*BeanFactroy[T]) IfTypeStru

func (self *BeanFactroy[T]) IfTypeStru(v reflect.Type) bool

func (*BeanFactroy[T]) IsProxy

func (self *BeanFactroy[T]) IsProxy(some any) bool

func (*BeanFactroy[T]) LoadBeanGeneral

func (self *BeanFactroy[T]) LoadBeanGeneral() baseiface.ISingleton

func (*BeanFactroy[T]) LoadBeanProxy

func (self *BeanFactroy[T]) LoadBeanProxy() T

func (*BeanFactroy[T]) NewOfPtrTypeProxy

func (self *BeanFactroy[T]) NewOfPtrTypeProxy() T

func (*BeanFactroy[T]) NewProxyTypeOf

func (self *BeanFactroy[T]) NewProxyTypeOf(t reflect.Type) (baseiface.IbaseProxy, bool)

func (*BeanFactroy[T]) RegisterLoadBean

func (self *BeanFactroy[T]) RegisterLoadBean() (string, error)

func (*BeanFactroy[T]) SetFieldValue

func (self *BeanFactroy[T]) SetFieldValue(some any, key string, value any)

type BeanInfo

type BeanInfo struct {
	// contains filtered or unexported fields
}

func NewBeanInfo

func NewBeanInfo() *BeanInfo

func (*BeanInfo) Bean

func (beanInf *BeanInfo) Bean() baseiface.ISingleton

func (*BeanInfo) BeanName

func (beanInf *BeanInfo) BeanName() string

func (*BeanInfo) CreateBean

func (beanInf *BeanInfo) CreateBean() baseiface.ISingleton

func (*BeanInfo) FindNameOfIface

func (beanInf *BeanInfo) FindNameOfIface(iface any) string

func (*BeanInfo) LoadBean

func (beanInf *BeanInfo) LoadBean() baseiface.LoadBean

func (*BeanInfo) SetBean

func (beanInf *BeanInfo) SetBean(bean baseiface.ISingleton)

func (*BeanInfo) SetBeanName

func (beanInf *BeanInfo) SetBeanName(name string)

func (*BeanInfo) SetLoadBean

func (beanInf *BeanInfo) SetLoadBean(load baseiface.LoadBean)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL