auth

package
v0.1.212 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReflectTypeIModularAuthMiddleware = di.GetInterfaceReflectType((*IModularAuthMiddleware)(nil))

ReflectTypeIModularAuthMiddleware used when your service claims to implement IModularAuthMiddleware

Functions

func AddScopedIModularAuthMiddleware

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

AddScopedIModularAuthMiddleware adds a type that implements IModularAuthMiddleware

func AddScopedIModularAuthMiddlewareByFunc

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

AddScopedIModularAuthMiddlewareByFunc adds a type by a custom func

func AddSingletonIModularAuthMiddleware

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

AddSingletonIModularAuthMiddleware adds a type that implements IModularAuthMiddleware

func AddSingletonIModularAuthMiddlewareByFunc

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

AddSingletonIModularAuthMiddlewareByFunc adds a type by a custom func

func AddSingletonIModularAuthMiddlewareByObj

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

AddSingletonIModularAuthMiddlewareByObj adds a prebuilt obj

func AddTransientIModularAuthMiddleware

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

AddTransientIModularAuthMiddleware adds a type that implements IModularAuthMiddleware

func AddTransientIModularAuthMiddlewareByFunc

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

AddTransientIModularAuthMiddlewareByFunc adds a type by a custom func

func RemoveAllIModularAuthMiddleware

func RemoveAllIModularAuthMiddleware(builder *di.Builder)

RemoveAllIModularAuthMiddleware removes all IModularAuthMiddleware from the DI

Types

type IModularAuthMiddleware

type IModularAuthMiddleware interface {
	// GetUnaryServerInterceptor ...
	GetUnaryServerInterceptor() grpc.UnaryServerInterceptor
}

IModularAuthMiddleware ...

func GetIModularAuthMiddlewareFromContainer

func GetIModularAuthMiddlewareFromContainer(ctn di.Container) IModularAuthMiddleware

GetIModularAuthMiddlewareFromContainer alternative to SafeGetIModularAuthMiddlewareFromContainer but panics of object is not present

func GetManyIModularAuthMiddlewareFromContainer

func GetManyIModularAuthMiddlewareFromContainer(ctn di.Container) []IModularAuthMiddleware

GetManyIModularAuthMiddlewareFromContainer alternative to SafeGetManyIModularAuthMiddlewareFromContainer but panics of object is not present

func SafeGetIModularAuthMiddlewareFromContainer

func SafeGetIModularAuthMiddlewareFromContainer(ctn di.Container) (IModularAuthMiddleware, error)

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

func SafeGetManyIModularAuthMiddlewareFromContainer

func SafeGetManyIModularAuthMiddlewareFromContainer(ctn di.Container) ([]IModularAuthMiddleware, error)

SafeGetManyIModularAuthMiddlewareFromContainer 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