request

package
v0.1.288-herb-bring-ba... Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReflectTypeIItems = di.GetInterfaceReflectType((*IItems)(nil))

ReflectTypeIItems used when your service claims to implement IItems

View Source
var ReflectTypeIRequest = di.GetInterfaceReflectType((*IRequest)(nil))

ReflectTypeIRequest used when your service claims to implement IRequest

Functions

func AddScopedIItems

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

AddScopedIItems adds a type that implements IItems

func AddScopedIItemsByFunc

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

AddScopedIItemsByFunc adds a type by a custom func

func AddScopedIItemsByFuncWithMetadata added in v0.1.217

func AddScopedIItemsByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddScopedIItemsByFuncWithMetadata adds a type by a custom func

func AddScopedIItemsWithMetadata added in v0.1.217

func AddScopedIItemsWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddScopedIItemsWithMetadata adds a type that implements IItems

func AddScopedIRequest

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

AddScopedIRequest adds a type that implements IRequest

func AddScopedIRequestByFunc

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

AddScopedIRequestByFunc adds a type by a custom func

func AddScopedIRequestByFuncWithMetadata added in v0.1.217

func AddScopedIRequestByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddScopedIRequestByFuncWithMetadata adds a type by a custom func

func AddScopedIRequestWithMetadata added in v0.1.217

func AddScopedIRequestWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddScopedIRequestWithMetadata adds a type that implements IRequest

func AddSingletonIItems

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

AddSingletonIItems adds a type that implements IItems

func AddSingletonIItemsByFunc

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

AddSingletonIItemsByFunc adds a type by a custom func

func AddSingletonIItemsByFuncWithMetadata added in v0.1.217

func AddSingletonIItemsByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddSingletonIItemsByFuncWithMetadata adds a type by a custom func

func AddSingletonIItemsByObj

func AddSingletonIItemsByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)

AddSingletonIItemsByObj adds a prebuilt obj

func AddSingletonIItemsByObjWithMetadata added in v0.1.217

func AddSingletonIItemsByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddSingletonIItemsByObjWithMetadata adds a prebuilt obj

func AddSingletonIItemsWithMetadata added in v0.1.217

func AddSingletonIItemsWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddSingletonIItemsWithMetadata adds a type that implements IItems

func AddSingletonIRequest

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

AddSingletonIRequest adds a type that implements IRequest

func AddSingletonIRequestByFunc

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

AddSingletonIRequestByFunc adds a type by a custom func

func AddSingletonIRequestByFuncWithMetadata added in v0.1.217

func AddSingletonIRequestByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddSingletonIRequestByFuncWithMetadata adds a type by a custom func

func AddSingletonIRequestByObj

func AddSingletonIRequestByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)

AddSingletonIRequestByObj adds a prebuilt obj

func AddSingletonIRequestByObjWithMetadata added in v0.1.217

func AddSingletonIRequestByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddSingletonIRequestByObjWithMetadata adds a prebuilt obj

func AddSingletonIRequestWithMetadata added in v0.1.217

func AddSingletonIRequestWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddSingletonIRequestWithMetadata adds a type that implements IRequest

func AddTransientIItems

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

AddTransientIItems adds a type that implements IItems

func AddTransientIItemsByFunc

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

AddTransientIItemsByFunc adds a type by a custom func

func AddTransientIItemsByFuncWithMetadata added in v0.1.217

func AddTransientIItemsByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddTransientIItemsByFuncWithMetadata adds a type by a custom func

func AddTransientIItemsWithMetadata added in v0.1.217

func AddTransientIItemsWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddTransientIItemsWithMetadata adds a type that implements IItems

func AddTransientIRequest

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

AddTransientIRequest adds a type that implements IRequest

func AddTransientIRequestByFunc

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

AddTransientIRequestByFunc adds a type by a custom func

func AddTransientIRequestByFuncWithMetadata added in v0.1.217

func AddTransientIRequestByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddTransientIRequestByFuncWithMetadata adds a type by a custom func

func AddTransientIRequestWithMetadata added in v0.1.217

func AddTransientIRequestWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddTransientIRequestWithMetadata adds a type that implements IRequest

func GetIItemsDefinition added in v0.1.217

func GetIItemsDefinition(ctn di.Container) *di.Def

GetIItemsDefinition returns that last definition registered that this container can provide

func GetIItemsDefinitions added in v0.1.217

func GetIItemsDefinitions(ctn di.Container) []*di.Def

GetIItemsDefinitions returns all definitions that this container can provide

func GetIRequestDefinition added in v0.1.217

func GetIRequestDefinition(ctn di.Container) *di.Def

GetIRequestDefinition returns that last definition registered that this container can provide

func GetIRequestDefinitions added in v0.1.217

func GetIRequestDefinitions(ctn di.Container) []*di.Def

GetIRequestDefinitions returns all definitions that this container can provide

func RemoveAllIItems

func RemoveAllIItems(builder *di.Builder)

RemoveAllIItems removes all IItems from the DI

func RemoveAllIRequest

func RemoveAllIRequest(builder *di.Builder)

RemoveAllIRequest removes all IRequest from the DI

Types

type IInnerRequest

type IInnerRequest interface {
	IRequest
	SetMetadata(md metautils.NiceMD)
	SetUnaryServerInfo(info *grpc.UnaryServerInfo)
	SetContext(context.Context)
}

IInnerRequest ...

type IItems

type IItems interface {
	Set(key string, value interface{})
	Get(key string) interface{}
	Delete(key string)
	Clear()
	Keys() []string
	GetItems() map[string]interface{}
}

IItems ...

func GetIItemsFromContainer

func GetIItemsFromContainer(ctn di.Container) IItems

GetIItemsFromContainer alternative to SafeGetIItemsFromContainer but panics of object is not present

func GetManyIItemsFromContainer added in v0.1.178

func GetManyIItemsFromContainer(ctn di.Container) []IItems

GetManyIItemsFromContainer alternative to SafeGetManyIItemsFromContainer but panics of object is not present

func SafeGetIItemsFromContainer

func SafeGetIItemsFromContainer(ctn di.Container) (IItems, error)

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

func SafeGetManyIItemsFromContainer added in v0.1.178

func SafeGetManyIItemsFromContainer(ctn di.Container) ([]IItems, error)

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

type IRequest

type IRequest interface {
	GetMetadata() metautils.NiceMD
	GetItems() IItems
	GetUnaryServerInfo() *grpc.UnaryServerInfo
	GetContext() context.Context
	GetContainer() di.Container
	GetClaimsPrincipal() contracts_claimsprincipal.IClaimsPrincipal
	GetServiceProvider() contracts_serviceprovider.IServiceProvider
}

IRequest ...

func GetIRequestFromContainer

func GetIRequestFromContainer(ctn di.Container) IRequest

GetIRequestFromContainer alternative to SafeGetIRequestFromContainer but panics of object is not present

func GetManyIRequestFromContainer added in v0.1.178

func GetManyIRequestFromContainer(ctn di.Container) []IRequest

GetManyIRequestFromContainer alternative to SafeGetManyIRequestFromContainer but panics of object is not present

func SafeGetIRequestFromContainer

func SafeGetIRequestFromContainer(ctn di.Container) (IRequest, error)

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

func SafeGetManyIRequestFromContainer added in v0.1.178

func SafeGetManyIRequestFromContainer(ctn di.Container) ([]IRequest, error)

SafeGetManyIRequestFromContainer 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