simple

package
v1.0.1-rel-02 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: 6 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:`
	//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

FindBeanSimpleEntity

func NewSimpleEntity

func NewSimpleEntity() *SimpleEntity

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