api

package
v0.0.0-...-e58cecd Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UrlConfig = config.UrlConfig

Functions

func GenerateShortURL

func GenerateShortURL(c *fiber.Ctx, req GenerateShortURLReq) error

func VisitURL

func VisitURL(c *fiber.Ctx, req VisitURLReq) error

Types

type GenerateShortURLReq

type GenerateShortURLReq struct {
	URL      string    `json:"url" validate:"required" example:"https://github.com/long2ice/longurl"`
	ExpireAt time.Time `json:"expire_at"`
	Path     string    `json:"path" example:"longurl"`
	MaxTimes int       `json:"max_times" example:"1"`
}

type VisitURLReq

type VisitURLReq struct {
	Path string `uri:"path"`
}

Jump to

Keyboard shortcuts

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