injection

package
v5.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 2 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

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

Context of dependencies to be injected as context

func NewContext

func NewContext() *Context

NewContext return an instance of Context

func (*Context) AddDependency

func (c *Context) AddDependency(key string, d interface{})

AddDependency adds a dependency to the container

func (*Context) Dependency

func (c *Context) Dependency(key string) interface{}

Dependency returns an object given a key

func (*Context) Inject

func (c *Context) Inject(o interface{})

Inject add the Context instance as dependency

Jump to

Keyboard shortcuts

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