examples

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllComponent

type AllComponent struct{ Name string }

AllComponent is the component to be injected

func (*AllComponent) Woop

func (c *AllComponent) Woop()

type AllConsumer

type AllConsumer struct {
	// Dependencies will be injected with all known AllDependency (qualifier = *)
	Dependencies []AllDependency `inject:"qualifier=*"`
}

AllConsumer is the consumer for SimpleDependency

type AllDependency

type AllDependency interface {
	Woop()
}

AllDependency is the interface for a dependency to be injected

type FactoryComponent

type FactoryComponent struct{ Name string }

FactoryComponent is the component to be injected

func (*FactoryComponent) Woop

func (c *FactoryComponent) Woop()

type FactoryConsumer

type FactoryConsumer struct {
	// Dependency will be injected by Factory
	Dependency FactoryDependency `inject:""`
}

FactoryConsumer is the consumer for SimpleDependency

type FactoryDependency

type FactoryDependency interface {
	Woop()
}

FactoryDependency is the interface for a dependency to be injected

type OptionalConsumer

type OptionalConsumer struct {
	// Dependency cannot be resolved
	Dependency OptionalDependency `inject:"optional"`
}

OptionalConsumer is the consumer for SimpleDependency

type OptionalDependency

type OptionalDependency interface {
	Woop()
}

OptionalDependency is the interface for a dependency to be injected

type ParentComponent

type ParentComponent struct{ Name string }

ParentComponent is the component to be injected

func (*ParentComponent) Woop

func (c *ParentComponent) Woop()

type ParentConsumer

type ParentConsumer struct {
	// Dependency will be injected without qualifier
	Dependency ParentDependency `inject:""`
}

ParentConsumer is the consumer for ParentDependency

type ParentDependency

type ParentDependency interface {
	Woop()
}

ParentDependency is the interface for a dependency to be injected

type PriorityComponent

type PriorityComponent struct{ Name string }

PriorityComponent is the component to be injected

func (*PriorityComponent) Woop

func (c *PriorityComponent) Woop()

type PriorityConsumer

type PriorityConsumer struct {
	// Dependency will be injected by priority
	Dependency PriorityDependency `inject:""`
}

PriorityConsumer is the consumer for SimpleDependency

type PriorityDependency

type PriorityDependency interface {
	Woop()
}

PriorityDependency is the interface for a dependency to be injected

type QualifierComponent

type QualifierComponent struct{ Name string }

QualifierComponent is the component to be injected

func (*QualifierComponent) Woop

func (c *QualifierComponent) Woop()

type QualifierConsumer

type QualifierConsumer struct {
	// Dependency will be injected without qualifier
	Dependency QualifierDependency `inject:"qualifier=squash"`
}

QualifierConsumer is the consumer for SimpleDependency

type QualifierDependency

type QualifierDependency interface {
	Woop()
}

QualifierDependency is the interface for a dependency to be injected

type SimpleComponent

type SimpleComponent struct{ Name string }

SimpleComponent is the component to be injected

func (*SimpleComponent) Woop

func (c *SimpleComponent) Woop()

type SimpleConsumer

type SimpleConsumer struct {
	// Dependency will be injected without qualifier
	Dependency SimpleDependency `inject:""`
}

SimpleConsumer is the consumer for SimpleDependency

type SimpleDependency

type SimpleDependency interface {
	Woop()
}

SimpleDependency is the interface for a dependency to be injected

Jump to

Keyboard shortcuts

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