update to support postgresql and add godocs
This commit is contained in:
@@ -14,6 +14,17 @@ import (
|
||||
models "vctp/server/models"
|
||||
)
|
||||
|
||||
// VmMoveEvent records a VM move CloudEvent as an update.
|
||||
// @Summary Record VM move event
|
||||
// @Description Parses a VM move CloudEvent and creates an update record.
|
||||
// @Tags events
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param event body models.CloudEventReceived true "CloudEvent payload"
|
||||
// @Success 200 {object} map[string]string "Move event processed"
|
||||
// @Failure 400 {object} map[string]string "Invalid request"
|
||||
// @Failure 500 {object} map[string]string "Server error"
|
||||
// @Router /api/event/vm/move [post]
|
||||
func (h *Handler) VmMoveEvent(w http.ResponseWriter, r *http.Request) {
|
||||
params := queries.CreateUpdateParams{}
|
||||
var unixTimestamp int64
|
||||
|
||||
Reference in New Issue
Block a user