Version: v1.2.0 Latest Latest

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

Go to latest
Published: Nov 20, 2021 License: MIT Imports: 7 Imported by: 0




View Source
const (
	DigGroupTag = "group"
	DigNameTag  = "name"


View Source
var DigInField = reflect.TypeOf(struct{ dig.In }{}).Field(0)
View Source
var DigProvideOptionsType reflect.Type // dig.provideOptions
View Source
var ErrorType = reflect.TypeOf(new(error)).Elem()


func EnsureValueExported added in v1.1.0

func EnsureValueExported(value reflect.Value) reflect.Value

func EqualsProvideOutputs added in v1.1.0

func EqualsProvideOutputs(a []ProvideOutput, b []ProvideOutput) bool

func ExtractWithLocationForPC

func ExtractWithLocationForPC(Invoke func(function interface{}, opts ...dig.InvokeOption) error, callSkip int, typ interface{}, opts ...ExtractOption) (interface{}, error)

func IsDigErrMissingDependencies added in v1.2.0

func IsDigErrMissingDependencies(err error) bool

func MakeExtractFunc added in v1.1.0

func MakeExtractFunc(ptr interface{}, opts ...ExtractOption) interface{}

func ProvideWithLocationForPC

func ProvideWithLocationForPC(Provide func(constructor interface{}, opts ...dig.ProvideOption) error, callSkip int, constructor interface{}, opts ...dig.ProvideOption) error

func TryFixDigErr added in v1.1.0

func TryFixDigErr(err error, pc uintptr) error

func TryFixDigErrByFunc added in v1.2.0

func TryFixDigErrByFunc(err error, location *digcopy.Func) error

func WrapErrorWithLocationForPC added in v1.1.0

func WrapErrorWithLocationForPC(callSkip int, f func(pc uintptr) error) error

func WrapResolveCyclicError added in v1.2.0

func WrapResolveCyclicError(err error, location *digcopy.Func, output *ProvideOutput) error


type ExtractOption

type ExtractOption interface {

type ExtractOptionFunc added in v1.1.0

type ExtractOptionFunc func(*ExtractOptions)

func (ExtractOptionFunc) ApplyExtractOption added in v1.1.0

func (f ExtractOptionFunc) ApplyExtractOption(opts *ExtractOptions)

type ExtractOptions

type ExtractOptions struct {
	Name  string
	Group string

type LocationFixOption added in v1.2.0

type LocationFixOption struct {
	CallSkip int

type PropertyInfo added in v1.2.0

type PropertyInfo struct {
	ResolveCyclic bool
	Inputs        []ProvideInput
	Injected      bool
	Error         error

type ProvideInfosWrapper added in v1.2.0

type ProvideInfosWrapper struct {
	// contains filtered or unexported fields

func (*ProvideInfosWrapper) ExportedInputs added in v1.2.0

func (piw *ProvideInfosWrapper) ExportedInputs() []ProvideInput

func (*ProvideInfosWrapper) ExportedOutputs added in v1.2.0

func (piw *ProvideInfosWrapper) ExportedOutputs() []ProvideOutput

type ProvideInput added in v1.2.0

type ProvideInput struct {
	Type        reflect.Type
	Optional    bool
	Name, Group string

func (*ProvideInput) String added in v1.2.0

func (po *ProvideInput) String() string

type ProvideOptions added in v1.1.0

type ProvideOptions struct {
	Name  string
	Group string
	Info  *dig.ProvideInfo
	As    []interface{}

func ApplyProvideOptions added in v1.1.0

func ApplyProvideOptions(opts ...dig.ProvideOption) *ProvideOptions

type ProvideOutput added in v1.1.0

type ProvideOutput struct {
	Type        reflect.Type
	Name, Group string

func (*ProvideOutput) String added in v1.1.0

func (po *ProvideOutput) String() string


Path Synopsis

Jump to

Keyboard shortcuts

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