genny

package
v0.1.114-herb-health.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReflectTypeInterfaceType = di.GetInterfaceReflectType((*InterfaceType)(nil))

ReflectTypeInterfaceType used when your service claims to implement InterfaceType

Functions

func AddInterfaceTypeByObj

func AddInterfaceTypeByObj(builder *di.Builder, obj interface{})

AddInterfaceTypeByObj adds a prebuilt obj

func AddScopedInterfaceType

func AddScopedInterfaceType(builder *di.Builder, implType reflect.Type)

AddScopedInterfaceType adds a type that implements InterfaceType

func AddScopedInterfaceTypeByFunc

func AddScopedInterfaceTypeByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))

AddScopedInterfaceTypeByFunc adds a type by a custom func

func AddSingletonInterfaceType

func AddSingletonInterfaceType(builder *di.Builder, implType reflect.Type)

AddSingletonInterfaceType adds a type that implements InterfaceType

func AddSingletonInterfaceTypeByFunc

func AddSingletonInterfaceTypeByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))

AddSingletonInterfaceTypeByFunc adds a type by a custom func

func AddTransientInterfaceType

func AddTransientInterfaceType(builder *di.Builder, implType reflect.Type)

AddTransientInterfaceType adds a type that implements InterfaceType

func AddTransientInterfaceTypeByFunc

func AddTransientInterfaceTypeByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))

AddTransientInterfaceTypeByFunc adds a type by a custom func

Types

type InterfaceType

type InterfaceType generic.Type

InterfaceType ...

func GetInterfaceTypeFromContainer

func GetInterfaceTypeFromContainer(ctn di.Container) InterfaceType

GetInterfaceTypeFromContainer alternative to SafeGetInterfaceTypeFromContainer but panics of object is not present

func SafeGetInterfaceTypeFromContainer

func SafeGetInterfaceTypeFromContainer(ctn di.Container) (InterfaceType, error)

SafeGetInterfaceTypeFromContainer trys to get the object by type, will not panic, returns nil and error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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