handlers

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateDTO

type CreateDTO struct {
	Name string `json:"name" example:"prescaling-event-1"`
	v1.PrescalingEventSpec
}

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 a prescaling Event @Description Create a prescaling Event @Tags prescalingevent @Accept json @Produce json @Param data body CreateDTO true "The Request body" @Success 200 {object} services.PrescalingEventOutput @Failure 500 {object} string @Router /api/v1/events/ [post]

func (*EventHandlers) Current

func (e *EventHandlers) Current(w http.ResponseWriter, r *http.Request)

Current @Summary Get current prescaling Event @Description Get current prescaling Event @Tags prescalingevent @Accept json @Produce json @Success 200 {object} services.PrescalingEventOutput @Failure 204 {object} string @Router /api/v1/events/current/ [get]

func (*EventHandlers) Delete

func (e *EventHandlers) Delete(w http.ResponseWriter, r *http.Request)

Delete @Summary Delete a prescaling Event by name @Description Delete a prescaling Event by name @Tags prescalingevent @Accept json @Produce json @Param name path string true "event-name-1" @Success 200 {object} nil @Failure 404 {object} string @Failure 400 {object} string @Router /api/v1/events/{name} [delete]

func (*EventHandlers) Get

Get @Summary Get a prescaling Events by name @Description Get a prescaling Events by name @Tags prescalingevent @Accept json @Produce json @Param name path string true "event-name-1" @Success 200 {object} services.PrescalingEventOutput @Failure 404 {object} string @Router /api/v1/events/{name} [get]

func (*EventHandlers) List

func (e *EventHandlers) List(w http.ResponseWriter, r *http.Request)

List @Summary List all prescaling Events @Description List all prescaling Events @Tags prescalingevent @Accept json @Produce json @Success 200 {object} services.PrescalingEventListOutput @Failure 400 {object} string @Router /api/v1/events/ [get]

func (*EventHandlers) Update

func (e *EventHandlers) Update(w http.ResponseWriter, r *http.Request)

Update @Summary Update a prescaling Event by name @Description Update a prescaling Event by name @Tags prescalingevent @Accept json @Produce json @Param data body UpdateDTO true "The Request body" @Param name path string true "event-name-1" @Success 200 {object} services.PrescalingEventOutput @Failure 400 {object} string @Failure 404 {object} string @Router /api/v1/events/{name} [put]

type IEventHandlers

type IEventHandlers interface {
	Create(w http.ResponseWriter, r *http.Request)
	Delete(w http.ResponseWriter, r *http.Request)
	List(w http.ResponseWriter, r *http.Request)
	Get(w http.ResponseWriter, r *http.Request)
	Update(w http.ResponseWriter, r *http.Request)
	Current(w http.ResponseWriter, r *http.Request)
}

func NewEventHandlers

func NewEventHandlers(userService services.IPrescalingEventService) 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

type UpdateDTO

type UpdateDTO struct {
	Name string `json:"name" example:"prescaling-event-1"`
	v1.PrescalingEventSpec
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL