Documentation ¶
Index ¶
- Constants
- Variables
- func EnsureValueExported(value reflect.Value) reflect.Value
- func EqualsProvideOutputs(a []ProvideOutput, b []ProvideOutput) bool
- func ExtractWithLocationForPC(Invoke func(function interface{}, opts ...dig.InvokeOption) error, ...) (interface{}, error)
- func IsDigErrMissingDependencies(err error) bool
- func MakeExtractFunc(ptr interface{}, opts ...ExtractOption) interface{}
- func ProvideWithLocationForPC(Provide func(constructor interface{}, opts ...dig.ProvideOption) error, ...) error
- func TryFixDigErr(err error, pc uintptr) error
- func TryFixDigErrByFunc(err error, location *digcopy.Func) error
- func WrapErrorWithLocationForPC(callSkip int, f func(pc uintptr) error) error
- func WrapResolveCyclicError(err error, location *digcopy.Func, output *ProvideOutput) error
- type ExtractOption
- type ExtractOptionFunc
- type ExtractOptions
- type LocationFixOption
- type PropertyInfo
- type ProvideInfosWrapper
- type ProvideInput
- type ProvideOptions
- type ProvideOutput
Constants ¶
View Source
const ( DigGroupTag = "group" DigNameTag = "name" )
Variables ¶
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()
Functions ¶
func EnsureValueExported ¶ added in v1.1.0
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 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 TryFixDigErrByFunc ¶ added in v1.2.0
func WrapErrorWithLocationForPC ¶ added in v1.1.0
func WrapResolveCyclicError ¶ added in v1.2.0
func WrapResolveCyclicError(err error, location *digcopy.Func, output *ProvideOutput) error
Types ¶
type ExtractOption ¶
type ExtractOption interface {
ApplyExtractOption(*ExtractOptions)
}
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 LocationFixOption ¶ added in v1.2.0
type LocationFixOption struct { dig.ProvideOption dig.InvokeOption 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 { dig.ProvideInfo // 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
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
func (*ProvideOutput) String ¶ added in v1.1.0
func (po *ProvideOutput) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.