controllers

package
v0.0.0-...-4fae40e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OutputFile string = "outputs/test.json"
View Source
var URLRecords []URLRecord

Functions

func CreateRecord

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

func DeleteRecord

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

func GetShortURL

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

func GetURLs

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

Types

type URLRecord

type URLRecord struct {
	ID       int    `json:"id"`
	LongURL  string `json:"longurl"`
	ShortURL string `json:"shorturl"`
}

Jump to

Keyboard shortcuts

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