Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapObject ¶
func MapObject(actionResolver MappingActionResolver, resultSet ResultSet, source interface{}) error
Types ¶
type CompositeActionResolver ¶
type CompositeActionResolver struct {
Resolvers []MappingActionResolver
}
func ActionResolverComposedOf ¶
func ActionResolverComposedOf(resolvers ...MappingActionResolver) *CompositeActionResolver
func (*CompositeActionResolver) ResolveMappingActions ¶
func (r *CompositeActionResolver) ResolveMappingActions(source interface{}) ([]MappingAction, error)
type CompositeMappingAction ¶
type CompositeMappingAction struct {
Actions []MappingAction
}
func ActionComposedOf ¶
func ActionComposedOf(actions ...MappingAction) *CompositeMappingAction
func (*CompositeMappingAction) Apply ¶
func (a *CompositeMappingAction) Apply(source interface{}, resultSet ResultSet) error
type MappedResultSet ¶
type MappedResultSet struct {
// contains filtered or unexported fields
}
func NewMappedResultSet ¶
func NewMappedResultSet() *MappedResultSet
func (*MappedResultSet) AddResult ¶
func (m *MappedResultSet) AddResult(key string, result interface{})
func (*MappedResultSet) GetAllResults ¶
func (m *MappedResultSet) GetAllResults() map[string]interface{}
func (*MappedResultSet) GetResult ¶
func (m *MappedResultSet) GetResult(key string) (interface{}, bool)
type MappingAction ¶
type MappingAction interface { // Apply performs the action to the result set using source Apply(source interface{}, resultSet ResultSet) error }
MappingAction is the building block of the mapping process. Represents an individual action that updates the target resources
type MappingActionResolver ¶
type MappingActionResolver interface {
ResolveMappingActions(source interface{}) ([]MappingAction, error)
}
MappingActionResolver discovers MappingActions to be applied for a given source object
Click to show internal directories.
Click to hide internal directories.