ioc

package
v0.0.0-...-42841ab Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: MIT Imports: 2 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type C

type C struct {
	*dig.Container
}

C is just an extension struct that allows us to extend dig functionality

func (*C) Inject

func (c *C) Inject(dig IDig, items ...interface{}) IDig

Inject allows us to inject IAggPlugins

type IDig

type IDig interface {
	Inject(dig IDig, items ...interface{}) IDig
	String() string
	Scope(name string, opts ...dig.ScopeOption) *dig.Scope
	Provide(constructor interface{}, opts ...dig.ProvideOption) error
	Decorate(decorator interface{}, opts ...dig.DecorateOption) error
	Invoke(function interface{}, opts ...dig.InvokeOption) error
}

IDig provides an interface to DI receiver this has a dependency on uber-go/dig

func NewIoC

func NewIoC() IDig

NewIoC creates a new DI container

func SingleIoC

func SingleIoC() IDig

SingleIoC creates a new singleton DI container

Jump to

Keyboard shortcuts

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