uuid

package
v0.1.194 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReflectTypeIKSUID = di.GetInterfaceReflectType((*IKSUID)(nil))

ReflectTypeIKSUID used when your service claims to implement IKSUID

Functions

func AddScopedIKSUID

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

AddScopedIKSUID adds a type that implements IKSUID

func AddScopedIKSUIDByFunc

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

AddScopedIKSUIDByFunc adds a type by a custom func

func AddSingletonIKSUID

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

AddSingletonIKSUID adds a type that implements IKSUID

func AddSingletonIKSUIDByFunc

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

AddSingletonIKSUIDByFunc adds a type by a custom func

func AddSingletonIKSUIDByObj

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

AddSingletonIKSUIDByObj adds a prebuilt obj

func AddTransientIKSUID

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

AddTransientIKSUID adds a type that implements IKSUID

func AddTransientIKSUIDByFunc

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

AddTransientIKSUIDByFunc adds a type by a custom func

func RemoveAllIKSUID

func RemoveAllIKSUID(builder *di.Builder)

RemoveAllIKSUID removes all IKSUID from the DI

Types

type IKSUID

type IKSUID interface {
	UUID() string
}

IKSUID ...

func GetIKSUIDFromContainer

func GetIKSUIDFromContainer(ctn di.Container) IKSUID

GetIKSUIDFromContainer alternative to SafeGetIKSUIDFromContainer but panics of object is not present

func GetManyIKSUIDFromContainer added in v0.1.181

func GetManyIKSUIDFromContainer(ctn di.Container) []IKSUID

GetManyIKSUIDFromContainer alternative to SafeGetManyIKSUIDFromContainer but panics of object is not present

func SafeGetIKSUIDFromContainer

func SafeGetIKSUIDFromContainer(ctn di.Container) (IKSUID, error)

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

func SafeGetManyIKSUIDFromContainer added in v0.1.181

func SafeGetManyIKSUIDFromContainer(ctn di.Container) ([]IKSUID, error)

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

Jump to

Keyboard shortcuts

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