Documentation ¶
Index ¶
- Variables
- func AddScopedICoreConfig(builder *di.Builder, implType reflect.Type)
- func AddScopedICoreConfigByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIHealthServer(builder *di.Builder, implType reflect.Type)
- func AddScopedIHealthServerByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIStartup(builder *di.Builder, implType reflect.Type)
- func AddScopedIStartupByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIUnaryServerInterceptorBuilder(builder *di.Builder, implType reflect.Type)
- func AddScopedIUnaryServerInterceptorBuilderByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonICoreConfig(builder *di.Builder, implType reflect.Type)
- func AddSingletonICoreConfigByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonICoreConfigByObj(builder *di.Builder, obj interface{})
- func AddSingletonIHealthServer(builder *di.Builder, implType reflect.Type)
- func AddSingletonIHealthServerByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIHealthServerByObj(builder *di.Builder, obj interface{})
- func AddSingletonIStartup(builder *di.Builder, implType reflect.Type)
- func AddSingletonIStartupByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIStartupByObj(builder *di.Builder, obj interface{})
- func AddSingletonIUnaryServerInterceptorBuilder(builder *di.Builder, implType reflect.Type)
- func AddSingletonIUnaryServerInterceptorBuilderByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIUnaryServerInterceptorBuilderByObj(builder *di.Builder, obj interface{})
- func AddTransientICoreConfig(builder *di.Builder, implType reflect.Type)
- func AddTransientICoreConfigByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIHealthServer(builder *di.Builder, implType reflect.Type)
- func AddTransientIHealthServerByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIStartup(builder *di.Builder, implType reflect.Type)
- func AddTransientIStartupByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIUnaryServerInterceptorBuilder(builder *di.Builder, implType reflect.Type)
- func AddTransientIUnaryServerInterceptorBuilderByFunc(builder *di.Builder, implType reflect.Type, ...)
- func RemoveAllICoreConfig(builder *di.Builder)
- func RemoveAllIHealthServer(builder *di.Builder)
- func RemoveAllIStartup(builder *di.Builder)
- func RemoveAllIUnaryServerInterceptorBuilder(builder *di.Builder)
- type ConfigOptions
- type ICoreConfig
- type IHealthServer
- type IStartup
- type IUnaryServerInterceptorBuilder
- type StartupManifest
Constants ¶
This section is empty.
Variables ¶
var ReflectTypeICoreConfig = di.GetInterfaceReflectType((*ICoreConfig)(nil))
ReflectTypeICoreConfig used when your service claims to implement ICoreConfig
var ReflectTypeIHealthServer = di.GetInterfaceReflectType((*IHealthServer)(nil))
ReflectTypeIHealthServer used when your service claims to implement IHealthServer
var ReflectTypeIStartup = di.GetInterfaceReflectType((*IStartup)(nil))
ReflectTypeIStartup used when your service claims to implement IStartup
var ReflectTypeIUnaryServerInterceptorBuilder = di.GetInterfaceReflectType((*IUnaryServerInterceptorBuilder)(nil))
ReflectTypeIUnaryServerInterceptorBuilder used when your service claims to implement IUnaryServerInterceptorBuilder
Functions ¶
func AddScopedICoreConfig ¶
AddScopedICoreConfig adds a type that implements ICoreConfig
func AddScopedICoreConfigByFunc ¶
func AddScopedICoreConfigByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddScopedICoreConfigByFunc adds a type by a custom func
func AddScopedIHealthServer ¶
AddScopedIHealthServer adds a type that implements IHealthServer
func AddScopedIHealthServerByFunc ¶
func AddScopedIHealthServerByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddScopedIHealthServerByFunc adds a type by a custom func
func AddScopedIStartup ¶
AddScopedIStartup adds a type that implements IStartup
func AddScopedIStartupByFunc ¶
func AddScopedIStartupByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddScopedIStartupByFunc adds a type by a custom func
func AddScopedIUnaryServerInterceptorBuilder ¶
AddScopedIUnaryServerInterceptorBuilder adds a type that implements IUnaryServerInterceptorBuilder
func AddScopedIUnaryServerInterceptorBuilderByFunc ¶
func AddScopedIUnaryServerInterceptorBuilderByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddScopedIUnaryServerInterceptorBuilderByFunc adds a type by a custom func
func AddSingletonICoreConfig ¶
AddSingletonICoreConfig adds a type that implements ICoreConfig
func AddSingletonICoreConfigByFunc ¶
func AddSingletonICoreConfigByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddSingletonICoreConfigByFunc adds a type by a custom func
func AddSingletonICoreConfigByObj ¶
AddSingletonICoreConfigByObj adds a prebuilt obj
func AddSingletonIHealthServer ¶
AddSingletonIHealthServer adds a type that implements IHealthServer
func AddSingletonIHealthServerByFunc ¶
func AddSingletonIHealthServerByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddSingletonIHealthServerByFunc adds a type by a custom func
func AddSingletonIHealthServerByObj ¶
AddSingletonIHealthServerByObj adds a prebuilt obj
func AddSingletonIStartup ¶
AddSingletonIStartup adds a type that implements IStartup
func AddSingletonIStartupByFunc ¶
func AddSingletonIStartupByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddSingletonIStartupByFunc adds a type by a custom func
func AddSingletonIStartupByObj ¶
AddSingletonIStartupByObj adds a prebuilt obj
func AddSingletonIUnaryServerInterceptorBuilder ¶
AddSingletonIUnaryServerInterceptorBuilder adds a type that implements IUnaryServerInterceptorBuilder
func AddSingletonIUnaryServerInterceptorBuilderByFunc ¶
func AddSingletonIUnaryServerInterceptorBuilderByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddSingletonIUnaryServerInterceptorBuilderByFunc adds a type by a custom func
func AddSingletonIUnaryServerInterceptorBuilderByObj ¶
AddSingletonIUnaryServerInterceptorBuilderByObj adds a prebuilt obj
func AddTransientICoreConfig ¶
AddTransientICoreConfig adds a type that implements ICoreConfig
func AddTransientICoreConfigByFunc ¶
func AddTransientICoreConfigByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddTransientICoreConfigByFunc adds a type by a custom func
func AddTransientIHealthServer ¶
AddTransientIHealthServer adds a type that implements IHealthServer
func AddTransientIHealthServerByFunc ¶
func AddTransientIHealthServerByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddTransientIHealthServerByFunc adds a type by a custom func
func AddTransientIStartup ¶
AddTransientIStartup adds a type that implements IStartup
func AddTransientIStartupByFunc ¶
func AddTransientIStartupByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddTransientIStartupByFunc adds a type by a custom func
func AddTransientIUnaryServerInterceptorBuilder ¶
AddTransientIUnaryServerInterceptorBuilder adds a type that implements IUnaryServerInterceptorBuilder
func AddTransientIUnaryServerInterceptorBuilderByFunc ¶
func AddTransientIUnaryServerInterceptorBuilderByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddTransientIUnaryServerInterceptorBuilderByFunc adds a type by a custom func
func RemoveAllICoreConfig ¶ added in v0.1.144
RemoveAllICoreConfig removes all ICoreConfig from the DI
func RemoveAllIHealthServer ¶ added in v0.1.144
RemoveAllIHealthServer removes all IHealthServer from the DI
func RemoveAllIStartup ¶ added in v0.1.144
RemoveAllIStartup removes all IStartup from the DI
func RemoveAllIUnaryServerInterceptorBuilder ¶ added in v0.1.144
RemoveAllIUnaryServerInterceptorBuilder removes all IUnaryServerInterceptorBuilder from the DI
Types ¶
type ConfigOptions ¶
type ICoreConfig ¶
type ICoreConfig interface {
GetPort() int
}
ICoreConfig ...
func GetICoreConfigFromContainer ¶
func GetICoreConfigFromContainer(ctn di.Container) ICoreConfig
GetICoreConfigFromContainer alternative to SafeGetICoreConfigFromContainer but panics of object is not present
func SafeGetICoreConfigFromContainer ¶
func SafeGetICoreConfigFromContainer(ctn di.Container) (ICoreConfig, error)
SafeGetICoreConfigFromContainer trys to get the object by type, will not panic, returns nil and error
type IHealthServer ¶
type IHealthServer interface { health.HealthServer }
IHealthServer contract
func GetIHealthServerFromContainer ¶
func GetIHealthServerFromContainer(ctn di.Container) IHealthServer
GetIHealthServerFromContainer alternative to SafeGetIHealthServerFromContainer but panics of object is not present
func SafeGetIHealthServerFromContainer ¶
func SafeGetIHealthServerFromContainer(ctn di.Container) (IHealthServer, error)
SafeGetIHealthServerFromContainer trys to get the object by type, will not panic, returns nil and error
type IStartup ¶
type IStartup interface { GetStartupManifest() StartupManifest GetConfigOptions() *ConfigOptions ConfigureServices(builder *di.Builder) Configure(unaryServerInterceptorBuilder IUnaryServerInterceptorBuilder) GetPort() int RegisterGRPCEndpoints(server *grpc.Server) []interface{} SetRootContainer(container di.Container) OnPreServerStartup() error OnPostServerShutdown() }
IStartup contract
func GetIStartupFromContainer ¶
GetIStartupFromContainer alternative to SafeGetIStartupFromContainer but panics of object is not present
type IUnaryServerInterceptorBuilder ¶
type IUnaryServerInterceptorBuilder interface { GetUnaryServerInterceptors() []grpc.UnaryServerInterceptor Use(intercepter grpc.UnaryServerInterceptor) }
IUnaryServerInterceptorBuilder ...
func GetIUnaryServerInterceptorBuilderFromContainer ¶
func GetIUnaryServerInterceptorBuilderFromContainer(ctn di.Container) IUnaryServerInterceptorBuilder
GetIUnaryServerInterceptorBuilderFromContainer alternative to SafeGetIUnaryServerInterceptorBuilderFromContainer but panics of object is not present
func SafeGetIUnaryServerInterceptorBuilderFromContainer ¶
func SafeGetIUnaryServerInterceptorBuilderFromContainer(ctn di.Container) (IUnaryServerInterceptorBuilder, error)
SafeGetIUnaryServerInterceptorBuilderFromContainer trys to get the object by type, will not panic, returns nil and error
type StartupManifest ¶
StartupManifest informational