github.com/wfusion/gofusion@v1.1.14/common/di/interface.go (about)

     1  package di
     2  
     3  import (
     4  	"go.uber.org/dig"
     5  
     6  	"github.com/wfusion/gofusion/common/utils"
     7  )
     8  
     9  type DI interface {
    10  	Invoke(fn any) error
    11  	MustInvoke(fn any)
    12  	Provide(fn any, opts ...utils.OptionExtender) error
    13  	MustProvide(fn any, opts ...utils.OptionExtender) DI
    14  	Decorate(decorator any) error
    15  	MustDecorate(decorator any) DI
    16  	String() string
    17  	Clear()
    18  	Preload()
    19  }
    20  
    21  type In struct {
    22  	dig.In
    23  }
    24  type Out struct {
    25  	dig.Out
    26  }