Documentation
¶
Index ¶
- func AddBeamFor(ptr any) Beam
- func GetBeam[T any]() Beam
- func GetBeamDefaultInstance[T any]() T
- func GetBeamScopedInstance[T any]() T
- func GetLogger() *logger.Logger
- func NewBeamFor(ptr any) Beam
- func ValErr[T any](val T, err error) T
- type BeamWithFoundry
- type BeamWithInject
- type BeamWithValue
- type TestValuer
- type TestingComponent
- type TestingContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBeamFor ¶
func AddBeamFor(ptr any) Beam
Creates and register a Beam via a struct pointer or reflect.Type of a struct pointer
func GetBeam ¶
func GetBeam[T any]() Beam
GetBeam() retrieve a Beam of type T (T must be a struct pointer or interface)
func GetBeamDefaultInstance ¶
func GetBeamDefaultInstance[T any]() T
GetBeamDefaultInstance() retrieve a Beam instance of type T (T must be a struct pointer or interface)
func NewBeamFor ¶
func NewBeamFor(ptr any) Beam
Creates a Beam via a struct pointer or reflect.Type of a struct pointer
Types ¶
type BeamWithFoundry ¶
type BeamWithFoundry[T any] struct { Component // contains filtered or unexported fields }
func (*BeamWithFoundry[T]) GetFoundry ¶
func (this *BeamWithFoundry[T]) GetFoundry() *Foundry[T]
type BeamWithInject ¶
type BeamWithInject struct {
Component
// contains filtered or unexported fields
}
func (*BeamWithInject) GetBeam ¶
func (this *BeamWithInject) GetBeam() *BeamWithValue
func (*BeamWithInject) SetBeam ¶
func (this *BeamWithInject) SetBeam(beam *BeamWithValue)
func (*BeamWithInject) WithBeam ¶
func (this *BeamWithInject) WithBeam(beam *BeamWithValue) *BeamWithInject
type BeamWithValue ¶
type BeamWithValue struct {
Component
// contains filtered or unexported fields
}
func (*BeamWithValue) GetValue ¶
func (this *BeamWithValue) GetValue() string
func (*BeamWithValue) SetValue ¶
func (this *BeamWithValue) SetValue(value string)
func (*BeamWithValue) WithValue ¶
func (this *BeamWithValue) WithValue(value string) *BeamWithValue
type TestValuer ¶
type TestingComponent ¶
type TestingComponent interface {
Stereotype
// contains filtered or unexported methods
}
type TestingContext ¶
type TestingContext interface {
// ContainerContext
InitializingContext
ContainerConfiguration
// AddBeamFor() adds a Beam for either a struct pointer or a reflect.Type of a struct pointer.
AddBeamFor(any) (Beam, Error)
// LoadConfig() will load a configuration map for the current context
LoadConfig(map[string]any) Error
// LoadConfigAt() will load a configuration map for the current context at the specified path
LoadConfigAt(map[string]any, string) Error
// LoadConfigForProfile() will load a configuration map for a specified profile
LoadConfigForProfile(map[string]any, string) Error
// LoadConfigForProfileAt() will load a configuration map for a specified profile at the specified path.
LoadConfigForProfileAt(map[string]any, string, string) Error
// Reset() will reset the container. You don't have to do it if you use Gomega.
Reset()
// Set the specific type to scan, only for special internal testing cases.
SetScanFor(rtype reflect.Type)
GetBeamDefaultInstance(Beam) *container.Instance
Register(beam Beam) Error
// EnableScanning() must be called in testing to activate component scanning.
EnableScanning()
}
func GetContainer ¶
func GetContainer() TestingContext
Click to show internal directories.
Click to hide internal directories.