Documentation ¶
Index ¶
- Constants
- Variables
- func AddScopedIHandler(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddScopedIHandlerByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIHandlerByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIHandlerEx(builder *di.Builder, reflectType reflect.Type, httpVerbs []HTTPVERB, ...)
- func AddScopedIHandlerFactory(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddScopedIHandlerFactoryByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIHandlerFactoryByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIHandlerFactoryWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddScopedIHandlerWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddSingletonIHandler(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddSingletonIHandlerByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIHandlerByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIHandlerByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
- func AddSingletonIHandlerByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, ...)
- func AddSingletonIHandlerFactory(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddSingletonIHandlerFactoryByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIHandlerFactoryByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIHandlerFactoryByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
- func AddSingletonIHandlerFactoryByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, ...)
- func AddSingletonIHandlerFactoryWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddSingletonIHandlerWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddTransientIHandler(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddTransientIHandlerByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIHandlerByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIHandlerFactory(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddTransientIHandlerFactoryByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIHandlerFactoryByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIHandlerFactoryWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddTransientIHandlerWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func GetIHandlerDefinition(ctn di.Container) *di.Def
- func GetIHandlerDefinitions(ctn di.Container) []*di.Def
- func GetIHandlerFactoryDefinition(ctn di.Container) *di.Def
- func GetIHandlerFactoryDefinitions(ctn di.Container) []*di.Def
- func RemoveAllIHandler(builder *di.Builder)
- func RemoveAllIHandlerFactory(builder *di.Builder)
- type HTTPVERB
- type IHandler
- type IHandlerFactory
- func GetIHandlerFactoryFromContainer(ctn di.Container) IHandlerFactory
- func GetManyIHandlerFactoryFromContainer(ctn di.Container) []IHandlerFactory
- func SafeGetIHandlerFactoryFromContainer(ctn di.Container) (IHandlerFactory, error)
- func SafeGetManyIHandlerFactoryFromContainer(ctn di.Container) ([]IHandlerFactory, error)
Constants ¶
const ( GET HTTPVERB = 0 POST = 1 PUT = 2 DELETE = 3 PATCH = 4 OPTIONS = 5 HEAD = 6 CONNECT = 7 TRACE = 8 )
Variables ¶
var ReflectTypeIHandler = di.GetInterfaceReflectType((*IHandler)(nil))
ReflectTypeIHandler used when your service claims to implement IHandler
var ReflectTypeIHandlerFactory = di.GetInterfaceReflectType((*IHandlerFactory)(nil))
ReflectTypeIHandlerFactory used when your service claims to implement IHandlerFactory
Functions ¶
func AddScopedIHandler ¶
func AddScopedIHandler(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddScopedIHandler adds a type that implements IHandler
func AddScopedIHandlerByFunc ¶
func AddScopedIHandlerByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddScopedIHandlerByFunc adds a type by a custom func
func AddScopedIHandlerByFuncWithMetadata ¶
func AddScopedIHandlerByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddScopedIHandlerByFuncWithMetadata adds a type by a custom func
func AddScopedIHandlerEx ¶
func AddScopedIHandlerEx(builder *di.Builder, reflectType reflect.Type, httpVerbs []HTTPVERB, path string)
AddScopedIHandlerEx ...
func AddScopedIHandlerFactory ¶
func AddScopedIHandlerFactory(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddScopedIHandlerFactory adds a type that implements IHandlerFactory
func AddScopedIHandlerFactoryByFunc ¶
func AddScopedIHandlerFactoryByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddScopedIHandlerFactoryByFunc adds a type by a custom func
func AddScopedIHandlerFactoryByFuncWithMetadata ¶
func AddScopedIHandlerFactoryByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddScopedIHandlerFactoryByFuncWithMetadata adds a type by a custom func
func AddScopedIHandlerFactoryWithMetadata ¶
func AddScopedIHandlerFactoryWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddScopedIHandlerFactoryWithMetadata adds a type that implements IHandlerFactory
func AddScopedIHandlerWithMetadata ¶
func AddScopedIHandlerWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddScopedIHandlerWithMetadata adds a type that implements IHandler
func AddSingletonIHandler ¶
func AddSingletonIHandler(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddSingletonIHandler adds a type that implements IHandler
func AddSingletonIHandlerByFunc ¶
func AddSingletonIHandlerByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddSingletonIHandlerByFunc adds a type by a custom func
func AddSingletonIHandlerByFuncWithMetadata ¶
func AddSingletonIHandlerByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIHandlerByFuncWithMetadata adds a type by a custom func
func AddSingletonIHandlerByObj ¶
func AddSingletonIHandlerByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
AddSingletonIHandlerByObj adds a prebuilt obj
func AddSingletonIHandlerByObjWithMetadata ¶
func AddSingletonIHandlerByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIHandlerByObjWithMetadata adds a prebuilt obj
func AddSingletonIHandlerFactory ¶
func AddSingletonIHandlerFactory(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddSingletonIHandlerFactory adds a type that implements IHandlerFactory
func AddSingletonIHandlerFactoryByFunc ¶
func AddSingletonIHandlerFactoryByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddSingletonIHandlerFactoryByFunc adds a type by a custom func
func AddSingletonIHandlerFactoryByFuncWithMetadata ¶
func AddSingletonIHandlerFactoryByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIHandlerFactoryByFuncWithMetadata adds a type by a custom func
func AddSingletonIHandlerFactoryByObj ¶
func AddSingletonIHandlerFactoryByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
AddSingletonIHandlerFactoryByObj adds a prebuilt obj
func AddSingletonIHandlerFactoryByObjWithMetadata ¶
func AddSingletonIHandlerFactoryByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIHandlerFactoryByObjWithMetadata adds a prebuilt obj
func AddSingletonIHandlerFactoryWithMetadata ¶
func AddSingletonIHandlerFactoryWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIHandlerFactoryWithMetadata adds a type that implements IHandlerFactory
func AddSingletonIHandlerWithMetadata ¶
func AddSingletonIHandlerWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIHandlerWithMetadata adds a type that implements IHandler
func AddTransientIHandler ¶
func AddTransientIHandler(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddTransientIHandler adds a type that implements IHandler
func AddTransientIHandlerByFunc ¶
func AddTransientIHandlerByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddTransientIHandlerByFunc adds a type by a custom func
func AddTransientIHandlerByFuncWithMetadata ¶
func AddTransientIHandlerByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddTransientIHandlerByFuncWithMetadata adds a type by a custom func
func AddTransientIHandlerFactory ¶
func AddTransientIHandlerFactory(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddTransientIHandlerFactory adds a type that implements IHandlerFactory
func AddTransientIHandlerFactoryByFunc ¶
func AddTransientIHandlerFactoryByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddTransientIHandlerFactoryByFunc adds a type by a custom func
func AddTransientIHandlerFactoryByFuncWithMetadata ¶
func AddTransientIHandlerFactoryByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddTransientIHandlerFactoryByFuncWithMetadata adds a type by a custom func
func AddTransientIHandlerFactoryWithMetadata ¶
func AddTransientIHandlerFactoryWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddTransientIHandlerFactoryWithMetadata adds a type that implements IHandlerFactory
func AddTransientIHandlerWithMetadata ¶
func AddTransientIHandlerWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddTransientIHandlerWithMetadata adds a type that implements IHandler
func GetIHandlerDefinition ¶
GetIHandlerDefinition returns that last definition registered that this container can provide
func GetIHandlerDefinitions ¶
GetIHandlerDefinitions returns all definitions that this container can provide
func GetIHandlerFactoryDefinition ¶
GetIHandlerFactoryDefinition returns that last definition registered that this container can provide
func GetIHandlerFactoryDefinitions ¶
GetIHandlerFactoryDefinitions returns all definitions that this container can provide
func RemoveAllIHandler ¶
RemoveAllIHandler removes all IHandler from the DI
func RemoveAllIHandlerFactory ¶
RemoveAllIHandlerFactory removes all IHandlerFactory from the DI
Types ¶
type IHandler ¶
type IHandler interface { GetMiddleware() []echo.MiddlewareFunc Do(c echo.Context) error }
IHandler ...
func GetIHandlerFromContainer ¶
GetIHandlerFromContainer alternative to SafeGetIHandlerFromContainer but panics of object is not present
func GetManyIHandlerFromContainer ¶
GetManyIHandlerFromContainer alternative to SafeGetManyIHandlerFromContainer but panics of object is not present
func SafeGetIHandlerFromContainer ¶
SafeGetIHandlerFromContainer trys to get the object by type, will not panic, returns nil and error
type IHandlerFactory ¶
type IHandlerFactory interface {
RegisterHandlers(app *echo.Group)
}
IHandlerFactory ...
func GetIHandlerFactoryFromContainer ¶
func GetIHandlerFactoryFromContainer(ctn di.Container) IHandlerFactory
GetIHandlerFactoryFromContainer alternative to SafeGetIHandlerFactoryFromContainer but panics of object is not present
func GetManyIHandlerFactoryFromContainer ¶
func GetManyIHandlerFactoryFromContainer(ctn di.Container) []IHandlerFactory
GetManyIHandlerFactoryFromContainer alternative to SafeGetManyIHandlerFactoryFromContainer but panics of object is not present
func SafeGetIHandlerFactoryFromContainer ¶
func SafeGetIHandlerFactoryFromContainer(ctn di.Container) (IHandlerFactory, error)
SafeGetIHandlerFactoryFromContainer trys to get the object by type, will not panic, returns nil and error
func SafeGetManyIHandlerFactoryFromContainer ¶
func SafeGetManyIHandlerFactoryFromContainer(ctn di.Container) ([]IHandlerFactory, error)
SafeGetManyIHandlerFactoryFromContainer trys to get the object by type, will not panic, returns nil and error