Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// DefaultTagKey is a key for Go struct tags that this module will check.
DefaultTagKey = "taint"
)
Functions ¶
func Inject ¶
func Inject(src, dst interface{}) error
Inject will inject fields of source object into destination object.
func InjectWithTag ¶
InjectWithTag will inject fields of source object into destination object using a custom Go struct tag.
Types ¶
type FieldRequiredError ¶
type FieldRequiredError struct {
FieldName string
}
FieldRequiredError defines an errors type for missing required field.
func (*FieldRequiredError) Error ¶
func (e *FieldRequiredError) Error() string
type InvalidInjectError ¶
InvalidInjectError defines an error type for invalid inject type.
func (*InvalidInjectError) Error ¶
func (e *InvalidInjectError) Error() string
type InvalidTypeError ¶
InvalidTypeError defines an error type for errors where source and destination types are not the same.
func (*InvalidTypeError) Error ¶
func (e *InvalidTypeError) Error() string
Click to show internal directories.
Click to hide internal directories.