autoinject

package
v0.0.0-...-14e6c00 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

/ autoinject extends go-inject library with a way to automatically generate a provider / for a struct type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoInjectModule

func AutoInjectModule(typePointer interface{}) autoInjectModule

/ Create a module for automatically providing a struct type with the default `autoinject.Auto` annotation.

Types

type Auto

type Auto struct{}

/ Default annotation for auto-injected types. / Can be used if the program does not have two components of the same type.

type AutoInjectable

type AutoInjectable interface {
	/// Returns a mapping of field names to annotations.
	/// Omitted fields imply `autoinject.Auto` annotation.
	/// Not implementing this method implies all fields having `autoinject.Auto` annotation.
	ProvideAutoInjectAnnotations() interface{}
}

/ An interface to be implemented to support auto-injecting a type.

Jump to

Keyboard shortcuts

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