shorturl

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

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerAddURL

func HandlerAddURL(pgx *db.PGClient) func(c *fiber.Ctx) error

func HandlerDeleteURL

func HandlerDeleteURL(pgx *db.PGClient) func(c *fiber.Ctx) error

func HandlerGetURL

func HandlerGetURL(pgx *db.PGClient) func(c *fiber.Ctx) error

func HandlerRedirectURL

func HandlerRedirectURL(pgx *db.PGClient) func(c *fiber.Ctx) error

Types

type Agent

type Agent struct {
	Name    string `json:"name"`
	Version string `json:"version"`
	IP      string `json:"ip"`
	Country string `json:"country"`
	ISP     string `json:"isp"`
	Proxy   bool   `json:"proxy"`
	Hosting bool   `json:"hosting"`
}

type Device

type Device struct {
	OS        string `json:"os"`
	OSVersion string `json:"osversion"`
	Mobile    bool   `json:"mobile"`
	Tablet    bool   `json:"tablet"`
	Desktop   bool   `json:"desktop"`
	Bot       bool   `json:"bot"`
}

type Meta

type Meta struct {
	Name    string `json:"name"`
	Content string `json:"content"`
}

type NewURL

type NewURL struct {
	URL     string    `json:"url"`
	Hash    string    `json:"hash"`
	Created time.Time `json:"created"`
}

type ShortURL

type ShortURL struct {
	URL     string    `json:"url"`
	Hash    string    `json:"hash"`
	Hit     int64     `json:"hit"`
	Created time.Time `json:"created"`
}

Jump to

Keyboard shortcuts

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