Exemple #1
0
func main() {

	d := dusk.OpenDatabase("mongo", "wengine", "OpenStack123", "127.0.0.1", "wengine")
	time_now := common.GetTime()
	my_motion := activa.Motion{Id: time_now, InitTime: time_now}
	err := d.WriteMotion(&my_motion)
	fmt.Printf("Insert err:%v", err)

}
Exemple #2
0
func CreateMotion() (m Motion) {

	time_now := common.GetTime()
	m.Id = time_now
	m.InitTime = time_now
	m.TaskState = TASK_STATE_new
	return m

}