Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateDTO ¶
type CreateDTO struct { Title string `json:"title" example:"Deployment service lambda"` Attributes v1.EventAttributes Links v1.EventLinks }
type EventHandlers ¶
type EventHandlers struct {
// contains filtered or unexported fields
}
func (*EventHandlers) Create ¶
func (e *EventHandlers) Create(w http.ResponseWriter, r *http.Request)
Create @Summary Create an Event @Description Create an Event @Tags event @Accept json @Produce json @Param data body CreateDTO true "The Request body" @Success 201 {object} services.EventOutput @Failure 500 {object} string @Router /api/v1/event/ [post]
func (*EventHandlers) GetId ¶
func (e *EventHandlers) GetId(w http.ResponseWriter, r *http.Request)
Get @Summary Get an Events by id @Description Get an Events by id @Tags event @Accept json @Produce json @Param id path string true "xxxxx-xxxxxx-xxxxx-xxxxxx" @Success 200 {object} services.EventOutput @Failure 404 {object} string @Router /api/v1/event/{id} [get]
func (*EventHandlers) List ¶
func (e *EventHandlers) List(w http.ResponseWriter, r *http.Request)
List @Summary List all Events @Description List all Events @Tags event @Accept json @Produce json @Success 200 {object} services.EventListOutput @Failure 400 {object} string @Router /api/v1/events/list [get]
func (*EventHandlers) Search ¶
func (e *EventHandlers) Search(w http.ResponseWriter, r *http.Request)
Get @Summary Search Events @Description Search Events @Tags event @Accept json @Produce json @Param source query string false "github_action" @Param type query string false "deployment" @Param priority query string false "P1" @Param status query string false "success" @Param service query string false "events-tracker" @Param start_date query string false "2024-01-21T12:09" @Param end_date query string false "2024-01-21T12:09" @Success 200 {object} services.EventListOutput @Failure 404 {object} string @Router /api/v1/events/search [get]
type IEventHandlers ¶
type IEventHandlers interface { Create(w http.ResponseWriter, r *http.Request) List(w http.ResponseWriter, r *http.Request) GetId(w http.ResponseWriter, r *http.Request) Search(w http.ResponseWriter, r *http.Request) }
func NewEventHandlers ¶
func NewEventHandlers(userService services.IEventService) IEventHandlers
type IStatusHandlers ¶
type IStatusHandlers interface {
Index(w http.ResponseWriter, r *http.Request)
}
func NewStatusHandlers ¶
func NewStatusHandlers() IStatusHandlers
type StatusHandlers ¶
type StatusHandlers struct{}
func (StatusHandlers) Index ¶
func (s StatusHandlers) Index(w http.ResponseWriter, r *http.Request)
type UpdateDTO ¶
type UpdateDTO struct { Title string `json:"title" example:"Deployement service event"` v1.EventAttributes v1.EventLinks }