single

package
v2.0.606 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: MulanPSL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectSimpleEntity

func InjectSimpleEntity(s *SimpleEntity)

func LoadSimpleEntity

func LoadSimpleEntity() baseiface.ISingleton

Types

type SimpleEntity

type SimpleEntity struct {
	basedto.BaseEntitySingle

	// 以下是依赖注入的示例
	// 注入的对象可以是单例、绑定、新建、无注入
	//auto  通过LoadBean()方法注入
	MultiAuto *multi.MultiEntity `godi:"auto"`
	//bind  通过BindUp()方法注入
	MultiBind *multi.MultiEntity `godi:"bind"`
	//new   通过New()方法注入
	MultiNew *multi.MultiEntity `godi:"new"`
	//none  不注入
	MultiNone *multi.MultiEntity `godi:"none"`
	//single  单例; 注入的对象为简单NEW
	MultiSingle  *multi.MultiEntity `godi:"single"`
	MultiBindNew *multi.MultiEntity `godi:"bind"`

	Id   int
	Name string
}

func FindBeanSimpleEntity

func FindBeanSimpleEntity() *SimpleEntity

func FindBeanSimpleEntityOk added in v2.0.601

func FindBeanSimpleEntityOk() (*SimpleEntity, bool)

func (*SimpleEntity) AutoInject

func (*SimpleEntity) AutoInject() bool

func (*SimpleEntity) Autoload

func (*SimpleEntity) Autoload() bool

func (*SimpleEntity) Bind

func (this *SimpleEntity) Bind()

注册一个成员加载函数

func (*SimpleEntity) Check

func (*SimpleEntity) Check()

Jump to

Keyboard shortcuts

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