Skip to content

Passing parameters to "Query" #29

@tim-lebedkov

Description

@tim-lebedkov

I created a job that should transform entities from one kind to another by getting the values from the request:

`func (x *transform) Query(r *http.Request) (*mapper.Query, error) {
c := appengine.NewContext(r)

err := r.ParseForm()
if err != nil {
	return nil, err
}

from := r.Form.Get("from")
to := r.Form.Get("to")

q := mapper.NewQuery(from)
q = q.NamespaceEmpty()
return q, nil

}
`

How can I pass this value ("to") to
func (x *transform) Next(c context.Context, counters mapper.Counters, key *datastore.Key) error
?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions