controllers

package
v0.0.0-...-a481ea3 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOriginalHandler

func GetOriginalHandler(w http.ResponseWriter, r *http.Request)

GetOriginalHandler : Getting Original URL from Short URL

func IndexHandler

func IndexHandler(w http.ResponseWriter, r *http.Request)

IndexHandler : Index Page

func PrivacyHandler

func PrivacyHandler(w http.ResponseWriter, r *http.Request)

func RedirectHandler

func RedirectHandler(w http.ResponseWriter, r *http.Request)

RedirectHandler Redirect short url

func ShortenHandler

func ShortenHandler(w http.ResponseWriter, r *http.Request)

ShortenHandler : Shorten URL

Types

type App

type App struct {
	Addr   string
	Router *chi.Mux
	Server http.Server
}

func (*App) Init

func (app *App) Init(appMode string)

func (*App) Run

func (app *App) Run()

Run App

type RequestBody

type RequestBody struct {
	URL    string `json:"url"`
	Custom string `json:"custom"`
}

RequestBody : Request body

Jump to

Keyboard shortcuts

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