// Generate point value for event
503704
func getEventValue(event *kube_api.Event) (string, error) {
	// TODO: check whether indenting is required.
	bytes, err := json.MarshalIndent(event, "", " ")
	if err != nil {
		return "", err
	}
	return string(bytes), nil
}
322351
func (g *EventGenerator) Event() *Event {
	active, alive := g.r.Intn(2) > 0, g.r.Intn(2) > 0
	return &Event{
		ID:              fmt.Sprintf("%d", g.r.Uint64()),
		Station:         g.g.String(6, 2000),
		UserID:          int(g.g.Uint64(100000000)) + 1,
		Timestamp:       g.g.Time(time.Date(2017, time.January, 1, 0, 0, 0, 0, time.UTC), time.Second*3).Format(time.RFC3339),
		Favorites:       g.genFavorites(),
		Items:           g.genItems(),
		Ranking:         g.genItems(),
		IfaceThing:      String(g.g.String(5, 5)),
		Velocity:        g.r.Intn(1000) + 2500,
		Active:          active,
		Alive:           alive,
		DeceasedBoolean: alive,

		Geo: g.genGeo(),
	}

}
315363
func PollEvents() <-chan Event {
	ch := make(chan Event)
	go func() {
		for {
			ch <- convertTermboxEvent(tb.PollEvent())
		}
	}()
	return ch
}
238422
func (s GeoDistanceSort) Point(lat, lon float64) GeoDistanceSort {
	s.points = append(s.points, GeoPointFromLatLon(lat, lon))
	return s
}
793213
func (f *Fpdf) point(x, y float64) {
	f.outf("%.2f %.2f m", x*f.k, (f.h-y)*f.k)
}
1184370
func GetPointerToInt64(p *float64) *int64 {
	if p == nil {
		return nil
	}
	i := int64(*p)
	return &i
}
71232
func (p *point) String() string {
	if p.Time().IsZero() {
		return string(p.Key()) + " " + string(p.fields)
	}
	return string(p.Key()) + " " + string(p.fields) + " " + strconv.FormatInt(p.UnixNano(), 10)
}
771329
func (_m *DBClient) UpdateEvent(e models.Event) error {
	ret := _m.Called(e)

	var r0 error
	if rf, ok := ret.Get(0).(func(models.Event) error); ok {
		r0 = rf(e)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}
772621
func createEvent(action string) *Event {
	return &Event{
		ID:        uuid.Generate().String(),
		Timestamp: time.Now(),
		Action:    action,
	}
}
1020026
func TouchEvent(x, y, id, action int) {
	Input.Mouse.X = float32(x) / opts.GlobalScale.X
	Input.Mouse.Y = float32(y) / opts.GlobalScale.Y
	switch action {
	case 0, 5:
		Input.Mouse.Action = Press
		Input.Touches[id] = Point{
			X: float32(x) / opts.GlobalScale.X,
			Y: float32(y) / opts.GlobalScale.Y,
		}
	case 1, 6:
		Input.Mouse.Action = Release
		delete(Input.Touches, id)
	case 2:
		Input.Mouse.Action = Move
		Input.Touches[id] = Point{
			X: float32(x) / opts.GlobalScale.X,
			Y: float32(y) / opts.GlobalScale.Y,
		}
	}
}
758552
func PollEvent() Event {
	ret := C.SDL_PollEvent(&cevent)
	if ret == 0 {
		return nil
	}
	return goEvent((*CEvent)(unsafe.Pointer(&cevent)))
}
730822
func (d *Dispatcher) dispatch(etype Type, value interface{}) error {
	// Create the event
	e := &event{
		etype:  etype,
		source: d.source,
		value:  value,
	}

	// Dispatch the event to all callbacks
	for _, cb := range d.callbacks[etype] {
		if err := cb(e); err != nil {
			return err
		}
	}

	return nil
}
869731
func (w *Webhook) UpdateEvent() error {
	data, err := jsoniter.Marshal(w.HookEvent)
	w.Events = string(data)
	return err
}
962973
func (h *Event) Value(value int64) *Event {
	h.value = value
	h.valueSet = true
	return h
}
260617
func _() {
	var _ Event = (*Absolute)(nil)        // assert *Absolute implements Event
	var _ Event = (*FAbsolute)(nil)       // assert *FAbsolute implements Event
	var _ Event = (*Gauge)(nil)           // assert *Gauge implements Event
	var _ Event = (*FGauge)(nil)          // assert *FGauge implements Event
	var _ Event = (*GaugeDelta)(nil)      // assert *GaugeDelta implements Event
	var _ Event = (*FGaugeDelta)(nil)     // assert *FGaugeDelta implements Event
	var _ Event = (*Increment)(nil)       // assert *Increment implements Event
	var _ Event = (*PrecisionTiming)(nil) // assert *PrecisionTiming implements Event
	var _ Event = (*Timing)(nil)          // assert *Timing implements Event
	var _ Event = (*Total)(nil)           // assert *Total implements Event
}
73523
func (c *Client) SimpleEvent(title, text string) error {
	e := NewEvent(title, text)
	return c.Event(e)
}
686098
func (pg *GoEvtxMap) EventID() int64 {
	eid, err := pg.GetInt(&EventIDPath)
	if err != nil {
		eid, err = pg.GetInt(&EventIDPath2)
		if err != nil {
			panic(err)
		}
		return eid
	}
	return eid
}