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