source

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(
	sourceManager *sourcemanager.SourceManager,
) (*Handler, error)

func (*Handler) CreateSource

func (h *Handler) CreateSource() http.HandlerFunc

@Summary Create source @Description Create a new source @Accept json @Produce json @Param source body CreateSourceRequest true "Created source" @Success 200 {object} entity.Source "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/sourceID [post]

func (*Handler) DeleteSource

func (h *Handler) DeleteSource() http.HandlerFunc

@Summary Delete source @Description Delete specified source by ID @Produce json @Param id path int true "Source ID" @Success 200 {object} entity.Source "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/source/{id} [delete]

func (*Handler) GetSource

func (h *Handler) GetSource() http.HandlerFunc

@Summary Get source @Description Get source information by source ID @Produce json @Param id path int true "Source ID" @Success 200 {object} entity.Source "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/source/{sourceID} [get]

func (*Handler) ListSources

func (h *Handler) ListSources() http.HandlerFunc

@Summary List source @Description List source information by source ID @Produce json @Success 200 {object} entity.Source "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/source [get]

func (*Handler) UpdateSource

func (h *Handler) UpdateSource() http.HandlerFunc

@Summary Update source @Description Update the specified source @Accept json @Produce json @Param source body UpdateSourceRequest true "Updated source" @Success 200 {object} entity.Source "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/source/{id} [put]

type SourceRequestParams

type SourceRequestParams struct {
	SourceID uint
}

Jump to

Keyboard shortcuts

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