func DDPResult(id string, result DDPData) *DDPMsg {
	data := DDPData{
		"id": id,
	}
	if len(result) > 0 {
		data["result"] = result
	}
	return &DDPMsg{
		DDPType: "result",
		Data:    data,
	}
}
DDPResult constructs a DDP result message
package harness
func DDPSub(id, name string, params ...interface{}) *DDPMsg {
	data := DDPData{
		"id":   id,
		"name": name,
	}
	if len(params) > 0 {
		data["params"] = params
	}
	return &DDPMsg{
		DDPType: "sub",
		Data:    data,
	}
}
func DDPAdded(collection, id string, fields DDPData) *DDPMsg {
	return &DDPMsg{
		DDPType: "added",
		Data: DDPData{
			"collection": collection,
			"id":         id,
			"fields":     fields,
		},
	}
}
func DDPChanged(collection, id string, fields DDPData, cleared []string) *DDPMsg {
	data := DDPData{
		"collection": collection,
		"id":         id,
		"fields":     fields,
	}
	if len(cleared) > 0 {
		data["cleared"] = cleared
	}
	return &DDPMsg{
		DDPType: "changed",
		Data:    data,
	}
}
func DDPRemoved(collection, id string) *DDPMsg {
	return &DDPMsg{
		DDPType: "removed",
		Data: DDPData{
			"collection": collection,
			"id":         id,
		},
	}
}
func DDPReady(id string) *DDPMsg {
	return &DDPMsg{
		DDPType: "ready",
		Data:    DDPData{},
	}
}
func DDPMethod(id, method string, params ...interface{}) *DDPMsg {
	data := DDPData{
		"method":     method,
		"id":         id,
		"randomSeed": DDPRandomSeed,
	}
	if len(params) > 0 {
		data["params"] = params
	}
	return &DDPMsg{
		DDPType: "method",
		Data:    data,
	}
}