Documentation
¶
Index ¶
- Constants
- Variables
- type Fig
- func (fig *Fig) AssembleRegistered(assemblingChain *[]string) error
- func (fig *Fig) Initialize(holder interface{}) error
- func (fig *Fig) Register(impls ...interface{}) error
- func (fig *Fig) RegisterValue(key string, value interface{}) error
- func (fig *Fig) RegisterValues(keyValues map[string]interface{}) error
- type FigError
- type InjectStep
- type InjectStepFigTagRequiredCheck
- type InjectStepRegisteredValueSetup
- type InjectStepSkipCheck
- type InjectStepValueSetup
- type Qualifier
- type StepMachine
Constants ¶
View Source
const ( // fig tag itself FIG_TAG = "fig" // configurations for fig tag IMPL_TAG_KEY = "impl" ENV_TAG_KEY = "env" SKIP_TAG_KEY = "skip" REG_TAG_KEY = "reg" QUAL_TAG_KEY = "qual" SIZE_TAG_KEY = "size" CAPACITY_TAG_KEY = "cap" )
Variables ¶
View Source
var ( ErrorCannotBeRegistered = errors.New("provided value can't be registered") ErrorCannotBeHolder = errors.New("provided value can't be holder") ErrorCannotDecideImplementation = errors.New("not able to get value to inject") ErrorRegisteredValueOverridden = errors.New("already registered value was overridden") ErrorIncorrectTagConfiguration = errors.New("invalid `fig` tag configuration") )
Functions ¶
This section is empty.
Types ¶
type Fig ¶
type Fig struct {
// contains filtered or unexported fields
}
func (*Fig) AssembleRegistered ¶
func (*Fig) Initialize ¶
func (*Fig) RegisterValue ¶
func (*Fig) RegisterValues ¶
type InjectStep ¶
type InjectStepFigTagRequiredCheck ¶
type InjectStepFigTagRequiredCheck struct {
// contains filtered or unexported fields
}
func NewFigTagRequiredCheck ¶
func NewFigTagRequiredCheck(fig *Fig, tag reflect.StructTag) *InjectStepFigTagRequiredCheck
func (*InjectStepFigTagRequiredCheck) Break ¶
func (figTagRequired *InjectStepFigTagRequiredCheck) Break() bool
func (*InjectStepFigTagRequiredCheck) Do ¶
func (figTagRequired *InjectStepFigTagRequiredCheck) Do() error
type InjectStepRegisteredValueSetup ¶
type InjectStepRegisteredValueSetup struct {
// contains filtered or unexported fields
}
func NewRegisteredValueSetup ¶
func (*InjectStepRegisteredValueSetup) Break ¶
func (registeredValue *InjectStepRegisteredValueSetup) Break() bool
func (*InjectStepRegisteredValueSetup) Do ¶
func (registeredValue *InjectStepRegisteredValueSetup) Do() error
type InjectStepSkipCheck ¶
type InjectStepSkipCheck struct {
// contains filtered or unexported fields
}
func NewSkipCheck ¶
func NewSkipCheck(tag reflect.StructTag) *InjectStepSkipCheck
func (*InjectStepSkipCheck) Break ¶
func (skipVerify *InjectStepSkipCheck) Break() bool
func (*InjectStepSkipCheck) Do ¶
func (skipVerify *InjectStepSkipCheck) Do() error
type InjectStepValueSetup ¶
type InjectStepValueSetup struct {
// contains filtered or unexported fields
}
func NewValueSetup ¶
func (*InjectStepValueSetup) Break ¶
func (valueSetup *InjectStepValueSetup) Break() bool
func (*InjectStepValueSetup) Do ¶
func (valueSetup *InjectStepValueSetup) Do() error
type StepMachine ¶
type StepMachine struct {
// contains filtered or unexported fields
}
func NewStepMachine ¶
func NewStepMachine() *StepMachine
func (*StepMachine) Add ¶
func (sm *StepMachine) Add(steps ...InjectStep) *StepMachine
func (*StepMachine) Do ¶
func (sm *StepMachine) Do() error
Click to show internal directories.
Click to hide internal directories.