Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHistory ¶
Initializes history plugin.
Example of generated code:
func BuildComponent2(service BuildComponent2Service) BuildComponent2Func {
return func(historyPtrVal *plugins.History) error {
historyPtrVal.Write("before call step Step1")
err := service.Step1()
if err != nil {
return err
}
historyPtrVal.Write("successful call step Step1", "err", err)
historyPtrVal.Write("before call step Step2")
err = service.Step2()
if err != nil {
return err
}
historyPtrVal.Write("successful call step Step2", "err", err)
}
}
func NewLogPlugin ¶
Initializes LogPlugin
Example:
func BuildComponent2(service BuildComponent2Service) BuildComponent2Func {
return func() error {
log.Printf("call step Step1\n")
err := service.Step1()
if err != nil {
return err
}
log.Printf("call step Step2\n")
err = service.Step2()
if err != nil {
return err
}
}
}
func NewWrapError ¶
Initializes WrapPlugin
Example:
func BuildComponent2(service BuildComponent2Service) BuildComponent2Func {
return func() error {
err := service.Step1()
if err != nil {
return errors.Wrap(err, "failure call Step1")
}
err = service.Step2()
if err != nil {
return errors.Wrap(err, "failure call Step2")
}
}
}
Types ¶
Click to show internal directories.
Click to hide internal directories.