web

package
Version: v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateShortenURL

func CreateShortenURL(c *gin.Context)

CreateShortenURL create shorten url

func Favicon

func Favicon(c *gin.Context)

Favicon represents the favicon.

func FetchShortenedURL

func FetchShortenedURL(c *gin.Context)

FetchShortenedURL show URL content

func Heartbeat

func Heartbeat(c *gin.Context)

Heartbeat for check server status

func Index

func Index(c *gin.Context)

Index represents the index page.

func IsInnError

func IsInnError(err error) bool

IsInnError is check error type

func NotFound

func NotFound(c *gin.Context)

NotFound represents the 404 page.

func QRCodeGenerator

func QRCodeGenerator(slug string) error

QRCodeGenerator create QRCode

func RedirectURL

func RedirectURL(c *gin.Context)

RedirectURL redirect shorten text to origin URL.

func ShortenedIndex

func ShortenedIndex(c *gin.Context)

ShortenedIndex index page.

func URLMeta

func URLMeta(c *gin.Context)

URLMeta for fetch metadata from URL

Types

type FormURL

type FormURL struct {
	URL string `json:"url,omitempty" binding:"required,url"`
}

FormURL URL Struct

type InnError

type InnError struct {
	Code    int
	Message string
}

InnError is an error implementation that includes a time and message.

func (InnError) Error

func (e InnError) Error() string

Jump to

Keyboard shortcuts

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