Documentation ¶
Index ¶
- Variables
- func AddScopedISecureCookie(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddScopedISecureCookieByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedISecureCookieByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedISecureCookieWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddSecureCookieConfigAccessorFunc(builder *di.Builder, fnc SecureCookieConfigAccessor)
- func AddSingletonISecureCookie(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddSingletonISecureCookieByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonISecureCookieByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonISecureCookieByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
- func AddSingletonISecureCookieByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, ...)
- func AddSingletonISecureCookieWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddTransientISecureCookie(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddTransientISecureCookieByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientISecureCookieByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientISecureCookieWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func GetISecureCookieDefinition(ctn di.Container) *di.Def
- func GetISecureCookieDefinitions(ctn di.Container) []*di.Def
- func RemoveAllISecureCookie(builder *di.Builder)
- func RemoveAllSecureCookieConfigAccessorFunc(builder *di.Builder)
- type ISecureCookie
- func GetISecureCookieFromContainer(ctn di.Container) ISecureCookie
- func GetManyISecureCookieFromContainer(ctn di.Container) []ISecureCookie
- func SafeGetISecureCookieFromContainer(ctn di.Container) (ISecureCookie, error)
- func SafeGetManyISecureCookieFromContainer(ctn di.Container) ([]ISecureCookie, error)
- type SecureCookieConfig
- type SecureCookieConfigAccessor
- func GetManySecureCookieConfigAccessorFromContainer(ctn di.Container) []SecureCookieConfigAccessor
- func GetSecureCookieConfigAccessorFromContainer(ctn di.Container) SecureCookieConfigAccessor
- func SafeGetManySecureCookieConfigAccessorFromContainer(ctn di.Container) ([]SecureCookieConfigAccessor, error)
- func SafeGetSecureCookieConfigAccessorFromContainer(ctn di.Container) (SecureCookieConfigAccessor, error)
Constants ¶
This section is empty.
Variables ¶
var ReflectTypeISecureCookie = di.GetInterfaceReflectType((*ISecureCookie)(nil))
ReflectTypeISecureCookie used when your service claims to implement ISecureCookie
var ReflectTypeSecureCookieConfigAccessor = reflect.TypeOf(SecureCookieConfigAccessor(nil))
ReflectTypeSecureCookieConfigAccessor used when your service claims to implement SecureCookieConfigAccessor
Functions ¶
func AddScopedISecureCookie ¶
func AddScopedISecureCookie(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddScopedISecureCookie adds a type that implements ISecureCookie
func AddScopedISecureCookieByFunc ¶
func AddScopedISecureCookieByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddScopedISecureCookieByFunc adds a type by a custom func
func AddScopedISecureCookieByFuncWithMetadata ¶
func AddScopedISecureCookieByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddScopedISecureCookieByFuncWithMetadata adds a type by a custom func
func AddScopedISecureCookieWithMetadata ¶
func AddScopedISecureCookieWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddScopedISecureCookieWithMetadata adds a type that implements ISecureCookie
func AddSecureCookieConfigAccessorFunc ¶
func AddSecureCookieConfigAccessorFunc(builder *di.Builder, fnc SecureCookieConfigAccessor)
AddSingletonSecureCookieConfigAccessorFunc adds a func to the DI
func AddSingletonISecureCookie ¶
func AddSingletonISecureCookie(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddSingletonISecureCookie adds a type that implements ISecureCookie
func AddSingletonISecureCookieByFunc ¶
func AddSingletonISecureCookieByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddSingletonISecureCookieByFunc adds a type by a custom func
func AddSingletonISecureCookieByFuncWithMetadata ¶
func AddSingletonISecureCookieByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonISecureCookieByFuncWithMetadata adds a type by a custom func
func AddSingletonISecureCookieByObj ¶
func AddSingletonISecureCookieByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
AddSingletonISecureCookieByObj adds a prebuilt obj
func AddSingletonISecureCookieByObjWithMetadata ¶
func AddSingletonISecureCookieByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonISecureCookieByObjWithMetadata adds a prebuilt obj
func AddSingletonISecureCookieWithMetadata ¶
func AddSingletonISecureCookieWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonISecureCookieWithMetadata adds a type that implements ISecureCookie
func AddTransientISecureCookie ¶
func AddTransientISecureCookie(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddTransientISecureCookie adds a type that implements ISecureCookie
func AddTransientISecureCookieByFunc ¶
func AddTransientISecureCookieByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddTransientISecureCookieByFunc adds a type by a custom func
func AddTransientISecureCookieByFuncWithMetadata ¶
func AddTransientISecureCookieByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddTransientISecureCookieByFuncWithMetadata adds a type by a custom func
func AddTransientISecureCookieWithMetadata ¶
func AddTransientISecureCookieWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddTransientISecureCookieWithMetadata adds a type that implements ISecureCookie
func GetISecureCookieDefinition ¶
GetISecureCookieDefinition returns that last definition registered that this container can provide
func GetISecureCookieDefinitions ¶
GetISecureCookieDefinitions returns all definitions that this container can provide
func RemoveAllISecureCookie ¶
RemoveAllISecureCookie removes all ISecureCookie from the DI
func RemoveAllSecureCookieConfigAccessorFunc ¶
RemoveAllSecureCookieConfigAccessorFunc removes all SecureCookieConfigAccessor functions from the DI
Types ¶
type ISecureCookie ¶
type ISecureCookie interface { SetCookieValue(c echo.Context, name string, value string, expires time.Time) error GetCookieValue(c echo.Context, name string) (string, error) DeleteCookie(c echo.Context, name string) error RefreshCookie(c echo.Context, name string, durration time.Duration) error }
ISecureCookie ...
func GetISecureCookieFromContainer ¶
func GetISecureCookieFromContainer(ctn di.Container) ISecureCookie
GetISecureCookieFromContainer alternative to SafeGetISecureCookieFromContainer but panics of object is not present
func GetManyISecureCookieFromContainer ¶
func GetManyISecureCookieFromContainer(ctn di.Container) []ISecureCookie
GetManyISecureCookieFromContainer alternative to SafeGetManyISecureCookieFromContainer but panics of object is not present
func SafeGetISecureCookieFromContainer ¶
func SafeGetISecureCookieFromContainer(ctn di.Container) (ISecureCookie, error)
SafeGetISecureCookieFromContainer trys to get the object by type, will not panic, returns nil and error
func SafeGetManyISecureCookieFromContainer ¶
func SafeGetManyISecureCookieFromContainer(ctn di.Container) ([]ISecureCookie, error)
SafeGetManyISecureCookieFromContainer trys to get the object by type, will not panic, returns nil and error
type SecureCookieConfig ¶
SecureCookieConfig ...
type SecureCookieConfigAccessor ¶
type SecureCookieConfigAccessor func() *SecureCookieConfig
SecureCookieConfigAccessor func in the DI
func GetManySecureCookieConfigAccessorFromContainer ¶
func GetManySecureCookieConfigAccessorFromContainer(ctn di.Container) []SecureCookieConfigAccessor
GetManySecureCookieConfigAccessorFromContainer alternative to SafeGetManySecureCookieConfigAccessorFromContainer but panics of object is not present
func GetSecureCookieConfigAccessorFromContainer ¶
func GetSecureCookieConfigAccessorFromContainer(ctn di.Container) SecureCookieConfigAccessor
GetSecureCookieConfigAccessorFromContainer alternative to SafeGetSecureCookieConfigAccessorFromContainer but panics of object is not present
func SafeGetManySecureCookieConfigAccessorFromContainer ¶
func SafeGetManySecureCookieConfigAccessorFromContainer(ctn di.Container) ([]SecureCookieConfigAccessor, error)
SafeGetManySecureCookieConfigAccessorFromContainer trys to get the object by type, will not panic, returns nil and error
func SafeGetSecureCookieConfigAccessorFromContainer ¶
func SafeGetSecureCookieConfigAccessorFromContainer(ctn di.Container) (SecureCookieConfigAccessor, error)
SafeGetSecureCookieConfigAccessorFromContainer trys to get the object by type, will not panic, returns nil and error