api

package
v0.0.0-...-6218f57 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCustomLink(rdb *redis.Client) fiber.Handler

Handler for creating custom Links parses request body and creates new link with custom name if the name is still available

func CreateLink(rdb *redis.Client) fiber.Handler

Handler for creating Links parses request body and creates new link

func GetClicks

func GetClicks(rdb *redis.Client) fiber.Handler

Handler for getting Link information looks up link by code and returns shortcoe, url and click count

func RedirectLink(rdb *redis.Client) fiber.Handler

Handler for redirecting to original URL looks up link by code and redirects user to original URL

func SetupRoutes

func SetupRoutes(app *fiber.App, rdb *redis.Client)

SetupRoutes sets up all the routes for the API

Types

This section is empty.

Jump to

Keyboard shortcuts

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