shortlink

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct{}

API shortlink API

func (API) Get

func (API) Get(c *gin.Context)

Get /api/shortlink/get @Summary Get short link @Description Get short link. Rate limit: 1,000 per hour @Tags Short-link @Accept json @Produce json,xml @Param "" body Request true "Request JSON" @Success 200 {object} data.APIResponse @Failure 400 {object} data.APIResponse @Failure 429 {object} data.APIResponse @Failure 500 {object} data.APIResponse @Router /api/shortlink/get [post]

func (API) RedirectShortLink(c *gin.Context)

RedirectShortLink /s/:id @Summary Redrect to short link @Description Redrect to short link @Tags Short-link @Accept json @Produce json,xml @Param id path int true "Short Link ID" @Success 200 {object} data.APIResponse @Failure 400 {object} data.APIResponse @Failure 500 {object} data.APIResponse @Router /s/{id} [post]

type Request

type Request struct {
	URL string `json:"url" xml:"url" form:"url" binding:"required"`
}

Request to get short link

Jump to

Keyboard shortcuts

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