Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Doer ¶
type Doer struct {
// contains filtered or unexported fields
}
Doer runs the query and sends to the workers the entities to transform and save.
func (*Doer) Apply ¶
func (d *Doer) Apply(t ...Transformer)
Apply adds Transformer to be applied to an Entity
type Entity ¶
type Entity struct { Properties map[string]datastore.Property // contains filtered or unexported fields }
Entity contains key and properties of a datastore entity
Implements datastore.KeyLoader in order to Load and Save the entity.
type Option ¶
Option is a functional option for configuring the Doer
func WithConcurrency ¶
WithConcurrency function to set numer of workers running concurrently
func WithFailOnError ¶
type Transformer ¶
Transformer is the interface that wraps methos Transform
Transform performs transformations on the Entity
type TransformerFunc ¶
TransformerFunc type is an adapter to allow the use of functions as Transformer
func RemoveField ¶
func RemoveField(field string) TransformerFunc
RemoveField returns a TransformerFunc that remove field of the Entity
func SetField ¶
func SetField(field string, value interface{}, index bool) TransformerFunc
SetField returns a TransformerFunc that sets a field to the Entity
func (TransformerFunc) Transform ¶
func (f TransformerFunc) Transform(e *Entity) error