db

package
v0.0.0-...-33ba3ad Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTable

func CreateTable(db *sql.DB) error

CreateTable ensures the URLs exists

func GetOriginalURL

func GetOriginalURL(db *sql.DB, shortURL string) (string, error)

GetOriginalURL retrieves the original URL by its short URL

func StoreURL

func StoreURL(db *sql.DB, shortURL, originalURL string) error

StoreURL stores a new short and original URL in the database

Types

This section is empty.

Jump to

Keyboard shortcuts

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