misc

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repos

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

Repos stores our dependencies

func NewRepos

func NewRepos(db *sqlx.DB) *Repos

NewRepos creates our data store

func (*Repos) DeleteQuote

func (r *Repos) DeleteQuote(c echo.Context) error

DeleteQuote handles deleting quotes @Summary Delete quote @Description deletes a quote by ID. @ID delete-quote @Tags misc, quotes @Param quoteid path int true "Quote ID" @Success 200 @Router /v1/internal/misc/quotes/{quoteid} [delete]

func (*Repos) GetWebcam

func (r *Repos) GetWebcam(c echo.Context) error

GetWebcam handles reverse proxying a webcam @Summary Get webcam @Description Reverse proxies the selected webcam returns the jpeg feed as a result. @ID get-webcam @Tags misc, webcams @Param cameraid path int true "Camera ID" @Router /v1/internal/misc/webcams/{cameraid} [get]

func (*Repos) ListQuotes

func (r *Repos) ListQuotes(c echo.Context) error

ListQuotes handles listing quotes by pagination @Summary List quotes @Description Lists quotes by pagination. @ID get-quotes @Tags misc, quotes @Produce json @Param amount path int true "Amount" @Param page path int true "Page" @Success 200 {array} misc.QuotePage @Router /v1/internal/misc/quotes/{amount}/{page} [get]

func (*Repos) ListWebcams

func (r *Repos) ListWebcams(c echo.Context) error

ListWebcams handles listing all webcams a user can access @Summary List webcams @Description List webcams available to user by using the permission ID @ID list-webcams @Tags misc, webcams @Success 200 {array} misc.Webcam @Router /v1/internal/misc/webcams [get]

func (*Repos) NewQuote

func (r *Repos) NewQuote(c echo.Context) error

NewQuote handles creating a quote @Summary New quote @Description creates a new quote. @ID new-quote @Tags misc, quotes @Accept json @Param quote body misc.Quote true "Quote object" @Success 201 {object} int "Quote ID" @Router /v1/internal/misc/quotes [post]

func (*Repos) UpdateQuote

func (r *Repos) UpdateQuote(c echo.Context) error

UpdateQuote handles updating a quote @Summary Update quote @Description updates a quote. @ID update-quote @Tags misc, quotes @Accept json @Param quote body misc.Quote true "Quote object" @Success 200 @Router /v1/internal/misc/quotes [put]

Jump to

Keyboard shortcuts

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