foundation

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2019 License: MIT Imports: 3 Imported by: 0

README

foundation

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	// The service container
	Container Container

	// Indicates if the application has been bootstrapped before.
	HasBeenBootstrapped bool
}

func (*Application) BindPathsInContainer

func (a *Application) BindPathsInContainer()

Bind all of the application paths in the container.

func (Application) Make

func (a Application) Make(abstract interface{}) interface{}

type Container

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

func NewContainer

func NewContainer() Container

func (*Container) Bind

func (c *Container) Bind(abstract interface{}, concrete interface{})

Register a binding with the container.

func (*Container) Bound

func (c *Container) Bound(abstract string) bool

Determine if the given abstract type has been bound.

func (Container) Copy

func (c Container) Copy() Container

func (Container) GetBindings added in v0.1.0

func (c Container) GetBindings() bindings

Get the container's bindings.

func (*Container) Instance

func (c *Container) Instance(abstract interface{}, concrete interface{}) interface{}

Register an existing instance as shared in the container.

func (*Container) IsAlias

func (c *Container) IsAlias(name string) bool

Determine if a given string is an alias.

func (*Container) JustBind added in v0.2.0

func (c *Container) JustBind(concrete interface{}) interface{}

Register an existing instance as shared in the container without an abstract

func (*Container) Make

func (c *Container) Make(abstract interface{}) interface{}

Resolve the given type from the container.

func (*Container) Singleton

func (c *Container) Singleton(abstract interface{}, concrete interface{})

Register a shared binding in the container.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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