update to support postgresql and add godocs
This commit is contained in:
@@ -12,7 +12,17 @@ import (
|
||||
models "vctp/server/models"
|
||||
)
|
||||
|
||||
// VmUpdate receives the CloudEvent for a VM modification or move
|
||||
// VmDeleteEvent records a VM deletion CloudEvent in the inventory.
|
||||
// @Summary Record VM delete event
|
||||
// @Description Parses a VM delete CloudEvent and marks the VM as deleted in inventory.
|
||||
// @Tags events
|
||||
// @Accept json
|
||||
// @Produce text/plain
|
||||
// @Param event body models.CloudEventReceived true "CloudEvent payload"
|
||||
// @Success 200 {string} string "Delete event processed"
|
||||
// @Failure 400 {string} string "Invalid request"
|
||||
// @Failure 500 {string} string "Server error"
|
||||
// @Router /api/event/vm/delete [post]
|
||||
func (h *Handler) VmDeleteEvent(w http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
deletedTimestamp int64
|
||||
|
||||
Reference in New Issue
Block a user