controllers

package
v0.0.0-...-6d88d4d Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateShortURL

func CreateShortURL(c *gin.Context)

CreatShortURL godoc @Summary 建立短網址 @Description 藉由 timestamp 轉 base62 的方式產生 unique ID 來作為短網址的 ID @Tags short @Accept json @Produce json @Param url body string true "Original URL" @Success 200 {object} createShortURLResponsePayload @Router /short [post]

func GetShortIDRediect

func GetShortIDRediect(c *gin.Context)

GetShortIDRediect godoc @Summary Redirect by short ID @Description Use 301 redirect by short ID @Tags short @Accept json @Produce json @Param shortID path string true "shortID redirect use" @Router /{shortID} [get]

Types

This section is empty.

Jump to

Keyboard shortcuts

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